tenlee2012 / elasticsearch-analysis-hao

一个非常hao用的elasticsearch(es)中文分词器插件
Apache License 2.0
231 stars 28 forks source link

的字被一起被search_analyzer分在一起了 #52

Open zaczou opened 1 year ago

zaczou commented 1 year ago

为什么的字会分在一起 企业微信截图_16638358953578

zaczou commented 1 year ago

在config里面没看到停用词典

tenlee2012 commented 1 year ago

你应该是配置了 autoWordLength 参数,不建议使用该参数。

autoWordLength | 根据空格标点符号字母数字等分隔后的汉字文本长度小于autoWordLength会自动识别为一个词语。 默认-1不开启,>=2视为开启

同时,本插件不支持停用词配置以及远程停用词词库。 如有需要,请使用es原生提供的停用词功能。 https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-stop-tokenfilter.html

PUT /my-index-000001 { "settings": { "analysis": { "analyzer": { "default": { "tokenizer": "whitespace", "filter": [ "my_custom_stop_words_filter" ] } }, "filter": { "my_custom_stop_words_filter": { "type": "stop", "stopwords_path": "停用词路径,每个词一行" "ignore_case": true } } } } }