在elasticsearch.yml 中配置
enabled_stop _filter =true; stop_path=“stop.dic”
报错 stop_path 不认识
在elasticsearch.yml 中配置
enabled_stop _filter =true; stop_path=“stop.dic”
报错 stop_path 不认识
PUT my_index
{
"settings": {
"analysis": {
"analyzer": {
"my_stop_analyzer": {
"type": "stop",
"stopwords": ["the", "over"]
}
}
}
}
}
POST my_index/_analyze
{
"analyzer": "my_stop_analyzer",
"text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
}
在stopwords 里配置你想要的停用词即可