1. 程式人生 > >安裝Elasticsearch analysis ik中文分詞外掛

安裝Elasticsearch analysis ik中文分詞外掛

安裝: elasticsearch-analysis-ik中文分詞外掛
第一步、下載
https://github.com/medcl/elasticsearch-analysis-ik/archive/v5.6.0.zip
解壓
unzip v5.6.0.zip

或者 git clone
git clone https://github.com/medcl/elasticsearch-analysis-ik.git

第二步、進入目錄,
cd elasticsearch-analysis-ik

使用maven打包:
mvn package

第三步、安裝
使用elasticsearch-plugin安裝外掛 
./bin/elasticsearch-plugin install file://目錄位置/elasticsearch-analysis-ik-5.6.0/target/releases/elasticsearch-analysis-ik-5.6.0.zip 

如果不行,unzip elasticsearch-analysis-ik-5.6.0.zip
把 解壓縮後的目錄複製到 Elasticsearch的plugin目錄裡,就OK了

第四步、啟動Elasticsearch

./bin/elasticsearch
....省略....
[2017-09-19T17:12:17,606][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [aggs-matrix-stats]
[2017-09-19T17:12:17,606][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [ingest-common]
[2017-09-19T17:12:17,607][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [lang-expression]
[2017-09-19T17:12:17,607][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [lang-groovy]
[2017-09-19T17:12:17,607][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [lang-mustache]
[2017-09-19T17:12:17,607][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [lang-painless]
[2017-09-19T17:12:17,607][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [parent-join]
[2017-09-19T17:12:17,607][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [percolator]
[2017-09-19T17:12:17,608][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [reindex]
[2017-09-19T17:12:17,608][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [transport-netty3]
[2017-09-19T17:12:17,608][INFO ][o.e.p.PluginsService     ] [node-master] loaded module [transport-netty4]
[2017-09-19T17:12:17,609][INFO ][o.e.p.PluginsService     ] [node-master] loaded plugin [analysis-ik]
[2017-09-19T17:12:19,394][INFO ][o.e.d.DiscoveryModule    ] [node-master] using discovery type [zen]
[2017-09-19T17:12:20,457][INFO ][o.e.n.Node               ] [node-master] initialized
[2017-09-19T17:12:20,457][INFO ][o.e.n.Node               ] [node-master] starting ...
....省略....