# Applying filters in ElasticSearch

**URL:** <https://discuss.elastic.co/t/applying-filters-in-elasticsearch/223442>\
**Category:** Elasticsearch\
**Created:** [March 13, 2020, 4:04am UTC](https://discuss.elastic.co/t/applying-filters-in-elasticsearch/223442 "2020-03-13T04:04:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cravinder489](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cravinder489/32/62858_2.png) [@cravinder489](https://discuss.elastic.co/u/cravinder489)\
**Post date:** [March 13, 2020, 4:04am UTC](https://discuss.elastic.co/t/applying-filters-in-elasticsearch/223442/1 "2020-03-13T04:04:06Z")

</div>

I have an index :idxquesanswer, in which i have a body field:

> "body" : {  
> "type" : "text",  
> "analyzer" : "synonym\_analyzer"  
> }

synonym\_analyzer is:

```auto
"filter" : {
            "synonym_filter" : {
              "type" : "synonym",
              "synonyms_path" : "wn_s.txt",
              "updateable" : "true"
            }
          },
          "analyzer" : {
            "synonym_analyzer" : {
              "filter" : [
                "lowercase",
                "synonym_filter"
              ],
              "tokenizer" : "standard"
            }
          }

```

Here wn\_s.txt is the sense dictionary of wordnet.  
Now when I search in the body field for some text, it gives incorrect documents as result in output. (I have 300 documents in my index and it's giving all in result)

 ![Screenshot (353)](https://us1.discourse-cdn.com/elastic/original/3X/1/9/192d8f9d886d81cfaf7a95d083dfb2e14058dff6.png)

Why is this happening?

---

<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 10, 2020, 4:04am UTC](https://discuss.elastic.co/t/applying-filters-in-elasticsearch/223442/2 "2020-04-10T04:04:13Z")

</div>

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