配置elasticsearch 以及ik分词

本文介绍如何在Elasticsearch 2.3.2版本中安装和配置IK分词器1.9.2版本,包括下载、编译、安装步骤及重启Elasticsearch服务的方法,并演示了如何验证IK分词器是否正确安装。

https://github.com/medcl/elasticsearch-analysis-ik
https://www.elastic.co/downloads/past-releases/elasticsearch-2-3-2
es:2.3.2
ik:1.9.2
一安装es:
wget 'https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.2/elasticsearch-2.3.2.tar.gz'
tar -xvzf elasticsearch2.3.2

安装head:

./plugin install mobz/elasticsearch-head
二安装ik:
wget 'https://github.com/medcl/elasticsearch-analysis-ik/archive/v1.9.2.zip'
unzip

1.compile

mvn package

copy and unzip target/releases/elasticsearch-analysis-ik-{version}.zip to your-es-root/plugins/ik

2.restart elasticsearch

验证ik分词

curl -XPOST  'http://192.168.6.30:9200/test/_analyze?analyzer=ik&pretty' -d'{"text":"我是中国人"}'
三安装marven

下载:wget 'http://mirrors.hust.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz'
解压:tar -xzvf apache-maven-3.0.5-bin.tar.gz
配置环境变量
sudo vim /etc/profile
添加
export M2_HOME=/home/weibo/apache-maven-3.0.5
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
保存 
source profile

测试
mvn -version

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值