进入elasticsearch安装目录下的bin目录:
1.安装head插件
plugin -install mobz/elasticsearch-head
验证: http://localhost:9200/_plugin/head/
*利用head查看关键字分词后的结果:
导航到any request->query:
填写三个域:a. http://127.0.0.1:9200/索引名/
b._analyze?analyzer=ik
c.要查看的关键词(关键词用""引起来)。
2.安装ik 分词
plugin -install medcl/elasticsearch-analysis-ik/1.1.0
cd config
wget http://github.com/downloads/medcl/elasticsearch-analysis-ik/ik.zip --no-check-certificate unzip ik.zip
rm ik.zip
配置elasticsearch.yml, 添加:
ik:
alias: [ik_analyzer]
type: org.elasticsearch.index.analysis.IkAnalyzerProvider
3.安装mongo river 插件:
plugin -install elasticsearch/elasticsearch-mapper-attachments/1.6.0
plugin -install richardwilly98/elasticsearch-river-mongodb/1.4.0
4.安装 suggest插件
plugin -url https://github.com/downloads/spinscale/elasticsearch-suggest-plugin/elasticsearch-suggest-0.0.4-0.19.0.zip -install suggest
注: ES版本与suggest插件版本需一致,否则会报异常。
更换plugins/suggest目录下的文件为新版本。(附件)