ElasticSearch 中文分词插件安装

[b]1. ik[/b]
现在不支持bin/plugin -install medcl/elasticsearch-analysis-ik/1.1.3
在elasticsearch/plugins目录下建analysis-ik目录
然后直接下载安装包
[url]https://github.com/medcl/elasticsearch-rtf/tree/master/elasticsearch/plugins/analysis-ik[/url]
cd plugins
mkdir analysis-ik
cd analysis-ik
wget https://github.com/medcl/elasticsearch-rtf/blob/master/elasticsearch/plugins/analysis-ik/elasticsearch-analysis-ik-1.1.4.jar?raw=true --no-check-certificate


词库还是一样
cd config
wget http://github.com/downloads/medcl/elasticsearch-analysis-ik/ik.zip --no-check-certificate
unzip ik.zip
rm ik.zip


[b]2. mmseg[/b]
直接下载安装包安装
cd plugins
mkdir analysis-mmseg
cd analysis-mmseg
wget https://github.com/medcl/elasticsearch-rtf/blob/master/elasticsearch/plugins/analysis-mmseg/elasticsearch-analysis-mmseg-1.1.2.jar?raw=true --no-check-certificate


词库
cd config
mkdir mmseg
wget https://github.com/medcl/elasticsearch-rtf/raw/master/elasticsearch/config/mmseg/chars.dic --no-check-certificate
wget https://github.com/medcl/elasticsearch-rtf/raw/master/elasticsearch/config/mmseg/units.dic --no-check-certificate
wget https://github.com/medcl/elasticsearch-rtf/raw/master/elasticsearch/config/mmseg/words-my.dic --no-check-certificate
wget https://github.com/medcl/elasticsearch-rtf/raw/master/elasticsearch/config/mmseg/words.dic --no-check-certificate


[b]3. paoding[/b]
直接下载安装包安装
cd plugins
mkdir analysis-paoding
cd analysis-paoding
wget https://github.com/medcl/elasticsearch-rtf/blob/master/elasticsearch/plugins/analysis-paoding/elasticsearch-analysis-paoding-1.0.1.jar?raw=true --no-check-certificate


词库
cd config
mkdir paoding
wget https://github.com/downloads/medcl/elasticsearch-analysis-paoding/config.zip --no-check-certificate
unzip config.zip
cp -rp config/paoding/* .
rm -rf config
rm config.zip


[b]完整elasticsearch配置[/b]
编辑elasticsearch.yml

index:
analysis:
tokenizer:
mmseg_maxword:
type: mmseg
seg_type: "max_word"
mmseg_complex:
type: mmseg
seg_type: "complex"
mmseg_simple:
type: mmseg
seg_type: "simple"
analyzer:
mmseg:
alias: [news_analyzer, mmseg_analyzer]
type: org.elasticsearch.index.analysis.MMsegAnalyzerProvider
ik:
alias: [ik_analyzer]
type: org.elasticsearch.index.analysis.IkAnalyzerProvider
ik_max_word:
type: ik
use_smart: false
ik_smart:
type: ik
use_smart: true
paoding:
alias: [paoding_analyzer]
type: org.elasticsearch.index.analysis.PaodingAnalyzerProvider
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值