# Troubles to apply aggregation on search

**URL:** <https://discuss.elastic.co/t/troubles-to-apply-aggregation-on-search/193222>\
**Category:** Kibana\
**Created:** [July 31, 2019, 9:59pm UTC](https://discuss.elastic.co/t/troubles-to-apply-aggregation-on-search/193222 "2019-07-31T21:59:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leonardo\_Antonio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leonardo_antonio/32/51380_2.png) [@Leonardo\_Antonio](https://discuss.elastic.co/u/Leonardo_Antonio)\
**Post date:** [July 31, 2019, 9:59pm UTC](https://discuss.elastic.co/t/troubles-to-apply-aggregation-on-search/193222/1 "2019-07-31T21:59:54Z")

</div>

I'm working with a stock entity and it's updated every 30 minutes. So I'm loading on elastic every modification of stock entity.

With this information I can create a stocklevel view but when I try to create the last state for each stock level I'm facing some issues. I tried to use the aggregation on search level (but seems not work).

Any clue?

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [August 22, 2019, 10:45pm UTC](https://discuss.elastic.co/t/troubles-to-apply-aggregation-on-search/193222/2 "2019-08-22T22:45:48Z")

</div>

Sorry, your question is unclear to me. What have you currently tried? Can you give a detailed example or maybe share a screenshot?

---

<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:** [September 19, 2019, 10:49pm UTC](https://discuss.elastic.co/t/troubles-to-apply-aggregation-on-search/193222/3 "2019-09-19T22:49:37Z")

</div>

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