Can I customize Elastic Search to use my own Stop Word list?

后端 未结 4 1847
感情败类
感情败类 2021-01-02 04:00

specifically, I want to index everything (e.g. the who) with no stop word list. Is elastic search flexible enough and easy enough to change?

4条回答
  •  無奈伤痛
    2021-01-02 04:36

    You can override default analyzer globally and turn off the stopword filter by adding these lines to your elasticsearch.yml:

    index.analysis.analyzer.default:
      type: custom
      tokenizer: standard
      filter: standard, lowercase
    

    This will create a custom analyzer with the standard tokenizer and two filters: standard and lowercase. This way your custom analyzer will be identical to the standard analyzer but it will not use the stopword filter. Because it's named "default", elasticsearch will use it everywhere where analyzer is not explicitly set.

提交回复
热议问题