一、安装Nginx 配置分词 # cd /mydata/nginx/html/ # mkdir es # cd es # vi analyze.txt # 添加单词 中国梦 乔先生 张三丰 ESC :wq docker安装Nginx 二、配置ES # cd /mydata/elasticsearch/plugins/ik/config/ # vi IKAnalyzer.cfg.xml 添加分词地址 <?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"></entry> <!--用户可以在这里配置自己的扩展停止词字典--> <entry key="ext_stopwords"></entry> <!--用户可以在这里配置远程扩展字典 --> <!-- <entry key="remote_ext_dict">words_location</entry> --> <entry key="remote_ext_dict">http://192.168.56.20/es/analyze.txt</entry> <!--用户可以在这里配置远程扩展停止词字典--> <!-- <entry key="remote_ext_stopwords">words_location</entry> --> </properties> # 重启 # docker restart elasticsearch 三、测试 POST _analyze { "analyzer": "ik_smart", "text": "中国人的中国梦张三丰乔先生" }