# Post\_filter and collapse. Is that possible?

**URL:** <https://discuss.elastic.co/t/post-filter-and-collapse-is-that-possible/135959>\
**Category:** Elasticsearch\
**Created:** [June 14, 2018, 3:52pm UTC](https://discuss.elastic.co/t/post-filter-and-collapse-is-that-possible/135959 "2018-06-14T15:52:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephan\_Daratha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephan_daratha/32/32177_2.png) [@Stephan\_Daratha](https://discuss.elastic.co/u/Stephan_Daratha)\
**Post date:** [June 14, 2018, 3:52pm UTC](https://discuss.elastic.co/t/post-filter-and-collapse-is-that-possible/135959/1 "2018-06-14T15:52:19Z")

</div>

Hi,

I was glad that I found by help of this page that elasticsearch has the collapse function.

But now I have the problem why I search for collapse again.  
It is the post\_filter.

I want to aggragate some conditions of objects first and then filter them from the hits.

But the problem is that the post\_filter doesn't work on the inner\_hits, too.

Is there any possibilty to do that or will I have to do a second request to get the perfect aggregation?

Thank you

---

<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:** [July 12, 2018, 3:52pm UTC](https://discuss.elastic.co/t/post-filter-and-collapse-is-that-possible/135959/2 "2018-07-12T15:52:30Z")

</div>

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