Deploy ik word segmenter

Deploy ik word segmenter

Case version: elasticsearch-analysis-ik-8.6.2

​ The default built-in word segmenter of ES is not friendly enough for Chinese processing, and may not achieve the results we want when creating an inverted index. However, the IK word segmenter can support Chinese word segmentation very well. Because it is a cluster deployment, each
server ES in ES needs to install the IK word segmenter.

1. Download and install the IK word segmenter into the ES plug-in library.

1. Offline installation

# 查找和ES版本匹配的版本下载
https://github.com/medcl/elasticsearch-analysis-ik/releases?after=v7.2.0

# 上传到ES的elasticsearch-8.6.2/plugin目录下
makedir analysis-ik
unzip elasticsearch-analysis-ik-8.6.2.zip	# 解压
rm elasticsearch-analysis-ik-8.6.2.zip

Insert image description here

2. Online installation

#进入到安装ES的bin目录下
cd /home/elasticsearch/elasticsearch-8.6.2/bin/
#从GitHub上下载与我们ES版本匹配的分词器(必须与ES版本一致)
./elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v8.6.2/elasticsearch-analysis-ik-8.6.2.zip
# 安装完成以后,ES目录下的plugins会发现出现了analysis-ik插件

3. Restart es after installation for it to take effect

# 重启
ps -ef | grep elastic
kill -9 [PID]
./bin/elasticsearch -d

Portal: [Deploy elasticsearch cluster]
Portal: [Deploy kibana visualization platform]

Guess you like

Origin blog.csdn.net/qq_41210783/article/details/132848496