我可以自定义 Elastic Search 以使用我自己的停用词列表吗? [英] Can I customize Elastic Search to use my own Stop Word list?

查看:22
本文介绍了我可以自定义 Elastic Search 以使用我自己的停用词列表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

具体来说,我想为没有停用词列表的所有内容(例如谁)编制索引.弹性搜索是否足够灵活且易于更改?

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?

推荐答案

默认情况下,elasticsearch 使用的分析器是一个 标准分析器,带有默认的 Lucene 英语停用词.通过将以下内容添加到 elasticsearch.yml 文件,我已将 elasticsearch 配置为使用相同的分析器但没有停用词.

By default, the analyzer elasticsearch uses is a standard analyzer with the default Lucene English stopwords. I have configured elasticsearch to use the same analyzer but without stopwords by adding the following to the elasticsearch.yml file.

# Index Settings
index:
  analysis:
    analyzer:
      # set standard analyzer with no stop words as the default for both indexing and searching
      default:
        type: standard
        stopwords: _none_

这篇关于我可以自定义 Elastic Search 以使用我自己的停用词列表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆