# Any plans for aggregation queries (SUM)?

**URL:** <https://discuss.elastic.co/t/any-plans-for-aggregation-queries-sum/224182>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [March 18, 2020, 7:49pm UTC](https://discuss.elastic.co/t/any-plans-for-aggregation-queries-sum/224182 "2020-03-18T19:49:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Boucher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandre_boucher/32/64693_2.png) [@Alexandre\_Boucher](https://discuss.elastic.co/u/Alexandre_Boucher)\
**Post date:** [March 18, 2020, 7:49pm UTC](https://discuss.elastic.co/t/any-plans-for-aggregation-queries-sum/224182/1 "2020-03-18T19:49:07Z")

</div>

I am currently using Algolia and am interested in App Search.

However, one important feature from Algolia that my team need is the aggregation feature done on facets (especially the sum feature). My use case is I search items, each one having a price associated to it, and need the sum of results' price when displaying results.

Is there any plan to have this available in App Search soon? Or is there a way to achieve it with the current feature set? I can't seem to find anything on it...

Do you have any suggestion?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [March 19, 2020, 11:41am UTC](https://discuss.elastic.co/t/any-plans-for-aggregation-queries-sum/224182/2 "2020-03-19T11:41:48Z")

</div>

Hi @Alexandre_Boucher. I don't think I fully understand what you are asking about. Could you give me an example?

---

<div class="post-metadata">

**Author:** ![Alexandre\_Boucher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandre_boucher/32/64693_2.png) [@Alexandre\_Boucher](https://discuss.elastic.co/u/Alexandre_Boucher)\
**Post date:** [March 19, 2020, 11:55am UTC](https://discuss.elastic.co/t/any-plans-for-aggregation-queries-sum/224182/3 "2020-03-19T11:55:49Z")

</div>

Of course! Let's say I have the following results when I query App Search:

```json
[{
  "name": {
    "raw": "A"
  },
  "amount": {
    "raw": 10
  }
}, {
  "name": {
    "raw": "B"
  },
  "amount": {
    "raw": 15
  }
}]

```

I would like to be able to get the total of the field `amount`. In this case, with these 2 results, it would be `10 + 15 = 25`

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [March 19, 2020, 12:08pm UTC](https://discuss.elastic.co/t/any-plans-for-aggregation-queries-sum/224182/4 "2020-03-19T12:08:42Z")

</div>

Oh that is interesting. And no, we don't have anything that would support that right now. Something like this would of course be possible with Elasticsearch, but not in App Search: [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-sum-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-sum-aggregation.html)

---

<div class="post-metadata">

**Author:** ![Alexandre\_Boucher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandre_boucher/32/64693_2.png) [@Alexandre\_Boucher](https://discuss.elastic.co/u/Alexandre_Boucher)\
**Post date:** [March 19, 2020, 12:33pm UTC](https://discuss.elastic.co/t/any-plans-for-aggregation-queries-sum/224182/5 "2020-03-19T12:33:58Z")

</div>

Do you have any plans to support this kind of feature in AppSearch soon?

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [March 20, 2020, 1:38pm UTC](https://discuss.elastic.co/t/any-plans-for-aggregation-queries-sum/224182/6 "2020-03-20T13:38:40Z")

</div>

Not to my knowledge.

---

<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 17, 2020, 1:38pm UTC](https://discuss.elastic.co/t/any-plans-for-aggregation-queries-sum/224182/7 "2020-04-17T13:38:42Z")

</div>

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