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 ‘中國人和中國’

相關文章
相關標籤/搜索