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

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

问题描述

具体来说,我想索引所有的内容(例如who),没有停止的单词列表。弹性搜索灵活性足够容易改变?

解决方案

默认情况下,分析器elasticsearch使用的是一个标准分析器与默认的Lucene英语禁用词。我已经配置了弹性搜索以使用相同的分析器,但没有禁用词,将以下内容添加到elasticsearch.yml文件中。

 #索引设置
索引:
分析:
分析器:
#设置标准分析器,没有停止字作为索引和搜索的默认值
默认值:
类型:标准
禁用词:_none_


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?

解决方案

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_

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

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