【发布时间】:2014-01-05 13:06:54
【问题描述】:
所以我想关闭 username、title 和 tags 字段上的停用词过滤,但不关闭 description 字段。
您可以想象,我不想过滤掉一个名为 the best 的结果,但如果它位于 description 字段中,我确实想阻止 the 影响分数(如果在 GitHub 上搜索 the你想要一个例子)。
现在@Javanna 说(Is there a way to "escape" ElasticSearch stop words?):
在您的情况下,我会禁用该特定字段的停用词,而不是修改停用词列表,但如果您愿意,您也可以这样做。
未能提供示例,因此我四处搜索并尝试了 common 查询:http://www.elasticsearch.org/blog/stop-stopping-stop-words-a-look-at-common-terms-query/,这对我也不起作用。
所以我搜索了专门停止过滤停用词的方法,但我找到的最接近的方法是在索引范围内停止它:Can I customize Elastic Search to use my own Stop Word list? 通过直接攻击分析器,或者没有文档提示制作我自己的分析器:/。
有选择地禁用某些字段的停用词的最佳方法是什么?
【问题讨论】:
标签: elasticsearch