elasticsearch 插件安装

elasticsearch 1.7.3git

注意: elasticsearch 的插件与elasticsearch的版本要匹配,不然可能安装不成功github

head,一款H5的数据查看客户端:

cd ${esroot}/bin/。 执行./plugin -install mobz/elasticsearch-headcurl

bigdesk,状态查看客户端:

./plugin -install lukas-vlcek/bigdesk/<bigdesk_version>elasticsearch

###ik-analyzer,中文分词器:maven

下载1.4.1 https://github.com/medcl/elasticsearch-analysis-ik.git mvn clean install(前提是配置了maven)。 将elasticsearch-analysis-ik-1.4.1.zip解压到 ${esroot}/plugins/ik目录下 复制elasticsearch-analysis-ik(git repository)中config目录下ik内容到{esroot}/config。 配置${esroot}/conf/elasticsearch.yml,在最下方加入:ide

################################## Analyzer ############################### index: analysis:
analyzer:
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测试

mmseg 分词安装

https://github.com/medcl/elasticsearch-analysis-mmseg 下载1.4.0 mvn clean package 生成elasticsearch-analysis-mmseg-1.4.0.jar放入{esroot}\plugins\mmseg目录 将config中的mmseg放到 {esroot}\config下url

完整配置

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插件

###测试: head:http://localhost:9200/_plugin/head/token

bigdesk:http://localhost:9200/_plugin/bigdesk/

ik:curl ‘localhost/idx/_analyze?analyzer=ik_smart’ -d ‘中国人和中国’

相关文章
相关标签/搜索