zoukankan      html  css  js  c++  java
  • elasticsearch安装ik分词

    ik分词插件下载

    https://github.com/medcl/elasticsearch-analysis-ik/releases

    下载对应elasticsearch版本的ik分词

    如: elasticsearch2.4对应ik版本:v1.10.4

    下载好后解压到elastisearch安装目录下的plugins目录中

    ../elasticsearch/plugins

    添加自己的字典

    将字典放到

    ../elasticsearch-2.4.4/plugins/elasticsearch-analysis-ik-1.10.4/config/custom/mine.dic

    并配置IKAnalyzer.cfg.xml 路径:

    ../elasticsearch-2.4.4/plugins/elasticsearch-analysis-ik-1.10.4/config/IKAnalyzer.cfg.xml

    将自己添加的字典加入到entry key="ext_dict"

    <?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;custom/company.dic</entry>
         <!--用户可以在这里配置自己的扩展停止词字典-->
        <entry key="ext_stopwords">custom/ext_stopword.dic</entry>
        <!--用户可以在这里配置远程扩展字典 -->
        <!-- <entry key="remote_ext_dict">words_location</entry> -->
        <!--用户可以在这里配置远程扩展停止词字典-->
        <!-- <entry key="remote_ext_stopwords">words_location</entry> -->
    </properties>
  • 相关阅读:
    进程、线程、协程
    python垃圾回收机制
    python变量存储和深浅拷贝
    Linux常用命令
    二叉树四种遍历,节点个数,深度
    装饰器
    ArrayList、Vector
    集合、Collection、迭代器、List
    卖票
    关于Thread和Runnable
  • 原文地址:https://www.cnblogs.com/xmeo/p/6964685.html
Copyright © 2011-2022 走看看