关于自定义:Elasticsearch-7x-配置-IK-自定义词典qbit

es 配置

  • IK Dictionary Configuration

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
    <properties>
      <comment>IK Analyzer 扩大配置</comment>
      <!--用户能够在这里配置本人的扩大字典 -->
      <entry key="ext_dict">custom/mydict.dic;custom/single_word_low_freq.dic</entry>
       <!--用户能够在这里配置本人的扩大进行词字典-->
      <entry key="ext_stopwords">custom/ext_stopword.dic</entry>
       <!--用户能够在这里配置近程扩大字典 -->
      <entry key="remote_ext_dict">location</entry>
       <!--用户能够在这里配置近程扩大进行词字典-->
      <entry key="remote_ext_stopwords">http://xxx.com/xxx.dic</entry>
    </properties>
  • 不能热词更新,每次批改词典都须要重启 ES
  • 热词更新参见 应用 nginx 疾速搭建 elasticsearch ik 近程词典服务

Kibana 测试

GET _analyze
{
  "analyzer": "ik_smart",
  "text": "三体"
}

本文出自 qbit snap

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理