# Stop token filter how to set whitespace char as stop word in stopwords\_path config file

**URL:** <https://discuss.elastic.co/t/stop-token-filter-how-to-set-whitespace-char-as-stop-word-in-stopwords-path-config-file/280905>\
**Category:** Kibana\
**Created:** [August 10, 2021, 9:43am UTC](https://discuss.elastic.co/t/stop-token-filter-how-to-set-whitespace-char-as-stop-word-in-stopwords-path-config-file/280905 "2021-08-10T09:43:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenchuangc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chenchuangc/32/40017_2.png) [@chenchuangc](https://discuss.elastic.co/u/chenchuangc)\
**Post date:** [August 10, 2021, 9:43am UTC](https://discuss.elastic.co/t/stop-token-filter-how-to-set-whitespace-char-as-stop-word-in-stopwords-path-config-file/280905/1 "2021-08-10T09:43:19Z")

</div>

**Elasticsearch 7.5**  
thank you for help me !

i want to set the stop word by the stopwords\_path , i set a lot word in the `stopwords.txt` file , most of the word in the file is effective but only the whitespace char is not effective

```auto
PUT jieba_test
{
  "settings": {
    "analysis": {
      "filter": {
        "jieba_stop": {
          "type": "stop",
          "stopwords_path": "stopwords.txt"
        }
      },
      "analyzer": {
        "my_ana": {
          "tokenizer": "jieba_index",
          "filter": [
            "lowercase",
            "jieba_stop"
          ]
        }
      }
    }
  }
}

```

when i change the setting by `stopwords` setting like below ,it is ok

```auto
PUT jieba_test02
{
  "settings": {
    "analysis": {
      "filter": {
        "jieba_stop": {
          "type": "stop",
          "stopwords": [" ", "is", "the"]
        }
      },
      "analyzer": {
        "my_ana": {
          "tokenizer": "jieba_index",
          "filter": [
            "lowercase",
            "jieba_stop"
          ]
        }
      }
    }
  }
}

```

i want to know , how could i setting whitespace char as stop token in the config file

sorry for bother you

---

<div class="post-metadata">

**Author:** ![monfera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monfera/32/26467_2.png) [@monfera](https://discuss.elastic.co/u/monfera)\
**Post date:** [August 20, 2021, 3:55pm UTC](https://discuss.elastic.co/t/stop-token-filter-how-to-set-whitespace-char-as-stop-word-in-stopwords-path-config-file/280905/2 "2021-08-20T15:55:29Z")

</div>

Hello, this is an Elasticsearch question and your question landed in the Kibana channel, please peruse the elasticsearch channel [Elasticsearch - Discuss the Elastic Stack](https://discuss.elastic.co/c/elastic-stack/elasticsearch)

---

<div class="post-metadata">

**Author:** ![chenchuangc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chenchuangc/32/40017_2.png) [@chenchuangc](https://discuss.elastic.co/u/chenchuangc)\
**Post date:** [August 25, 2021, 2:55am UTC](https://discuss.elastic.co/t/stop-token-filter-how-to-set-whitespace-char-as-stop-word-in-stopwords-path-config-file/280905/3 "2021-08-25T02:55:00Z")

</div>

ok 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:** [September 22, 2021, 2:55am UTC](https://discuss.elastic.co/t/stop-token-filter-how-to-set-whitespace-char-as-stop-word-in-stopwords-path-config-file/280905/4 "2021-09-22T02:55:56Z")

</div>

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