# How to get the result of the division between two sum fields By Using Java High REST Client

**URL:** <https://discuss.elastic.co/t/how-to-get-the-result-of-the-division-between-two-sum-fields-by-using-java-high-rest-client/171307>\
**Category:** Elasticsearch\
**Created:** [March 7, 2019, 1:01pm UTC](https://discuss.elastic.co/t/how-to-get-the-result-of-the-division-between-two-sum-fields-by-using-java-high-rest-client/171307 "2019-03-07T13:01:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![horaceli](https://avatars.discourse-cdn.com/v4/letter/h/35a633/32.png) [@horaceli](https://discuss.elastic.co/u/horaceli)\
**Post date:** [March 7, 2019, 1:01pm UTC](https://discuss.elastic.co/t/how-to-get-the-result-of-the-division-between-two-sum-fields-by-using-java-high-rest-client/171307/1 "2019-03-07T13:01:44Z")

</div>

How to get the result of the division between two sum fields By Using Java High REST Client

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 7, 2019, 3:47pm UTC](https://discuss.elastic.co/t/how-to-get-the-result-of-the-division-between-two-sum-fields-by-using-java-high-rest-client/171307/2 "2019-03-07T15:47:29Z")

</div>

Not sure what you called 2 sum fields, but let's assume it's only 2 normal numeric fields.  
You can use a scripted field or better compute this at index time using an ingest script processor.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 4, 2019, 3:47pm UTC](https://discuss.elastic.co/t/how-to-get-the-result-of-the-division-between-two-sum-fields-by-using-java-high-rest-client/171307/3 "2019-04-04T15:47:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
