Stop token filter how to set whitespace char as stop word in stopwords_path config file

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

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

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

Hello, this is an Elasticsearch question and your question landed in the Kibana channel, please peruse the elasticsearch channel Elasticsearch - Discuss the Elastic Stack

ok thank you

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