cuilll 2019-10-23 10:49 采纳率: 33.3%
浏览 359

elasticsearch 5.6.8 怎么使用 配置 停用词 ,去掉英文的冠词 a an the 这些。。。

在elasticsearch.yml 中配置

enabled_stop _filter =true; stop_path=“stop.dic”

报错 stop_path 不认识


  • 写回答

1条回答 默认 最新

  • 道友,且慢 2019-10-24 09:57
    关注

    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 里配置你想要的停用词即可

    评论

报告相同问题?