# Issue in implementing post filters

**URL:** <https://discuss.elastic.co/t/issue-in-implementing-post-filters/360441>\
**Category:** Elasticsearch\
**Created:** [May 29, 2024, 10:10am UTC](https://discuss.elastic.co/t/issue-in-implementing-post-filters/360441 "2024-05-29T10:10:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Gajjar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_gajjar/32/134892_2.png) [@Rahul\_Gajjar](https://discuss.elastic.co/u/Rahul_Gajjar)\
**Post date:** [May 29, 2024, 10:10am UTC](https://discuss.elastic.co/t/issue-in-implementing-post-filters/360441/1 "2024-05-29T10:10:02Z")

</div>

I am implementing a post-filter in the search query. I am obtaining successful results when applying the filter to some fields, but not for one specific field. I have also checked the mapping, and everything appears to be similar for all the fields. However, the filter is applying to some fields but not to others.  
(Post Filters: {'bool': {'must': [{'terms': {'field.enum': '[value]'}}]}})  
Can anyone have idea about this?

---

<div class="post-metadata">

**Author:** ![Artem\_Shelkovnikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem_shelkovnikov/32/134322_2.png) [@Artem\_Shelkovnikov](https://discuss.elastic.co/u/Artem_Shelkovnikov)\
**Post date:** [May 29, 2024, 11:20am UTC](https://discuss.elastic.co/t/issue-in-implementing-post-filters/360441/2 "2024-05-29T11:20:32Z")

</div>

Hi @Rahul_Gajjar,

Can you add more context to the question?

What could help answer the question:

- Mapping of the index that you're querying (only posting the mapping for fields that you query will help)
- What are the fields this post filter works well for?
- What are the fields this post filter does not work for?

---

<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:** [June 26, 2024, 11:21am UTC](https://discuss.elastic.co/t/issue-in-implementing-post-filters/360441/3 "2024-06-26T11:21:11Z")

</div>

Closed on June 26, 2024, 11:21am UTC

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