# When using a whitespace tokenizer the stop words filter doesn't work

**URL:** <https://discuss.elastic.co/t/when-using-a-whitespace-tokenizer-the-stop-words-filter-doesnt-work/38649>\
**Category:** Elasticsearch\
**Created:** [January 7, 2016, 4:45pm UTC](https://discuss.elastic.co/t/when-using-a-whitespace-tokenizer-the-stop-words-filter-doesnt-work/38649 "2016-01-07T16:45:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Imran\_Azad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/imran_azad/32/4394_2.png) [@Imran\_Azad](https://discuss.elastic.co/u/Imran_Azad)\
**Post date:** [January 7, 2016, 4:45pm UTC](https://discuss.elastic.co/t/when-using-a-whitespace-tokenizer-the-stop-words-filter-doesnt-work/38649/1 "2016-01-07T16:45:06Z")

</div>

When using the whitespace tokenizer, the stop words filter doesn't work. Here are the CURL commands to replicate:

```
    PUT /my_index
    {
      "settings": {
        "index": {
          "number_of_shards": 1,
          "analysis": {
              "analyzer": {
                 "fulltext":{
                "type":"custom",
                "tokenizer":"whitespace",
                "filter": ["english_stop"]
              }
              },
             "filter":{
                "english_stop":{
                   "type":"stop",
                   "stopwords":"_english_"
                }
              }
             }
          }
        }
      }
    }
    GET my_index/_analyze?analyzer=fulltext&text="the drug"

```

I need to be able to use the whitespace tokenizer because I'm also using the word\_delim filter which turns terms like "wi-fi" to wifi, if I use the standard tokenizer, I will lose this ability.

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [January 8, 2016, 10:14pm UTC](https://discuss.elastic.co/t/when-using-a-whitespace-tokenizer-the-stop-words-filter-doesnt-work/38649/2 "2016-01-08T22:14:28Z")

</div>

I replied here:

> <https://github.com/elastic/elasticsearch/issues/15835#issuecomment-170038749>

  
with an example, but the stop filter will still work, however, since you have no  
lowercase filter only already-lowercase stop words will be removed.

---

<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 5, 2017, 11:25pm UTC](https://discuss.elastic.co/t/when-using-a-whitespace-tokenizer-the-stop-words-filter-doesnt-work/38649/3 "2017-07-05T23:25:50Z")

</div>


