# Undesired Stopwords in Elastic Search

**URL:** https://discuss.elastic.co/t/undesired-stopwords-in-elastic-search/122807
**Category:** Elasticsearch
**Created:** [March 7, 2018, 2:30am UTC](https://discuss.elastic.co/t/undesired-stopwords-in-elastic-search/122807 "2018-03-07T02:30:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jack1234](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jack1234](https://discuss.elastic.co/u/jack1234)
#### Post date: [March 7, 2018, 2:30am UTC](https://discuss.elastic.co/t/undesired-stopwords-in-elastic-search/122807/1 "2018-03-07T02:30:26Z")

</div>

I am using Elastic Search 6.This is query

```
PUT /semtesttest
{
    "settings": {
        "index" : {
            "analysis" : {
              "filter": {
                "my_stop": {
                    "type": "stop",
                    "stopwords_path": "analysis1/stopwords.csv"
                  },
                 "synonym" : {
                        "type" : "synonym",
                        "synonyms_path" : "analysis1/synonym.txt"
                    }
                },
                "analyzer" : {
                    "my_analyzer" : {
                        "tokenizer" : "standard",
                        "filter" : ["synonym","my_stop"]
                    }
                }
            }
        }
    },
    "mappings": {
      "all_questions": {
         "dynamic": "strict",
          "properties": {
            "kbaid":{
              "type": "integer"
            },
            "answer":{
              "type": "text"
            },
            "question": {
              "type": "text",
              "analyzer": "my_analyzer"
            }
          }
        }
    }
}

PUT /semtesttest/all_questions/1
{
  "question":"this is hippie"
}

GET /semtesttest/all_questions/_search
{
    "query":{
      "fuzzy":{"question":{"value":"hippie","fuzziness":2}}
    }
}

GET /semtesttest/all_questions/_search
{
    "query":{
      "fuzzy":{"question":{"value":"this is","fuzziness":2}}
    }
}

```

in `synonym.txt` it is

```
this, that, money => sainai

```

in `stopwords.csv` it is

```
hello
how
are
you

```

The first get ('hippie') return empty  
only the second get ('this is') return results

what is the problem? It looks like the stop word "this is" is filtered in the first query, but I have specified my stop words explicitly?

---

<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 4, 2018, 2:31am UTC](https://discuss.elastic.co/t/undesired-stopwords-in-elastic-search/122807/2 "2018-04-04T02:31:20Z")

</div>

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