Popular blog tags

 

step 1:check Elasticsearch version installed on Ubuntu 

"number" : "7.4.2" 

{
  "name" : "iZuf6hn15mpmrtypv9ltogZ",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "9MRok0MvR62qtdbi8X3PBQ",
  "version" : {
    "number" : "7.4.2",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "2f90bbf7b93631e52bafb59b3b049cb44ec25e96",
    "build_date" : "2019-10-28T20:40:44.881551Z",
    "build_snapshot" : false,
    "lucene_version" : "8.2.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

step 2: download pre-build package zip IK Analysis version 7.4.2  for Elasticsearch from here

https://github.com/medcl/elasticsearch-analysis-ik/releases

you can get download address by click mouse right button then copy link address

 

wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.4.2/elasticsearch-analysis-ik-7.4.2.zip

 

create plugin folder

 cd your-es-root/plugins/ && mkdir ik

cd /usr/share/elasticsearch/plugins
mkdir ik

unzip plugin to folder your-es-root/plugins/ik

unzip elasticsearch-analysis-ik-7.4.2.zip ,then copy elasticsearch-analysis-ik-7.4.2/*.* to /usr/share/elasticsearch/plugins/ik

unzip elasticsearch-analysis-ik-7.4.2.zip -d elasticsearch-analysis-ik-7.4.2.zip

mv elasticsearch-analysis-ik-7.4.2 /usr/share/elasticsearch/plugins/ik
#pwd
output:
/usr/share/elasticsearch/plugins/ik
#ls -l
total 1436
-rw-r--r-- 1 root root 263965 May  6  2018 commons-codec-1.9.jar
-rw-r--r-- 1 root root  61829 May  6  2018 commons-logging-1.2.jar
drwxr-xr-x 2 root root   4096 Jan  2 06:52 config
-rw-r--r-- 1 root root  54643 Nov  4 11:05 elasticsearch-analysis-ik-7.4.2.jar
-rw-r--r-- 1 root root 736658 May  6  2018 httpclient-4.5.2.jar
-rw-r--r-- 1 root root 326724 May  6  2018 httpcore-4.4.4.jar
-rw-r--r-- 1 root root   1805 Nov  4 11:05 plugin-descriptor.properties
-rw-r--r-- 1 root root    125 Nov  4 11:05 plugin-security.policy

 

restart elasticsearch

sudo systemctl restart elasticsearch.service

You can also check Elasticsearch log file, /var/log/elasticsearch/elasticsearch.log, for more details.

[2020-01-02T07:04:35,638][INFO ][o.e.p.PluginsService     ] [iZuf6hn15mpmrtypv9ltogZ] loaded plugin [analysis-ik]

[2020-01-02T07:04:44,999][INFO ][o.w.a.d.Monitor          ] [iZuf6hn15mpmrtypv9ltogZ] try load config from /etc/elasticsearch/analysis-ik/IKAnalyzer.cfg.xml
[2020-01-02T07:04:45,007][INFO ][o.w.a.d.Monitor          ] [iZuf6hn15mpmrtypv9ltogZ] try load config from /usr/share/elasticsearch/plugins/ik/config/IKAnalyzer.cfg.xml

 

#/usr/share/elasticsearch/bin/elasticsearch-plugin list

output:

ik
http://127.0.0.1:9200/_cat/plugins

output:

iZuf6hn15mpmrtypv9ltogZ analysis-ik 7.4.2