Elasticsearch Installing Chinese word segmentation plugin IK

Source: Internet
Author: User

Elasticsearch default provided by the word breaker, will separate each character, not what we want according to keywords to participle, such as we want to "Chinese", "China", "I" such participle, so need to install Chinese word-breaker IK to achieve this function.

Elasticsearch-analysis-ik is a Chinese word breaker, support custom thesaurus, the specific installation steps are as follows:

1. Download the latest IK participle source from GitHub to local

Mode 1) can be downloaded via the git command, with the following code:

git clone Https://github.com/medcl/elasticsearch-analysis-ik

Mode 2) Manual download

Download the source code to the GitHub website at: Https://github.com/medcl/elasticsearch-analysis-ik, with a button "Download ZIP" below the right, Click here to download source code Elasticsearch-analysis-ik-master.zip

2, unzip the file Elasticsearch-analysis-ik.zip, execute the command:

Unzip Elasticsearch-analysis-ik.zip

Copy the entire directory of config/ik/in the Elasticsearch-analysis-ik-master directory to the config directory of the Elasticsearch installation directory, The elasticsearch.yml file in the config file in the Elasticsearch-analysis-ik-master directory is then overwritten with the elasticsearch.yml file in the Config directory elasticsearch the installation directory.

3, into the extracted folder directory, because the source code needs to use the MAVEN command package, execute the following command:

MVN Clean Package

If you do not have the Maven tool installed, you will need to install the Maven tool first, referring to the address:

http://www.yoodb.com/article/display/340

After executing the above command, the word breaker package for IK is ready.

4. Run the plugin command in the bin directory under the Elasticsearch installation path to install the newly compiled word breaker, with the following command:

Plugin-install Analysis-ik-url file:///#{project_path}/elasticsearch-analysis-ik/target/releases/ Elasticsearch-analysis-ik-1.4.0.zip

Elasticsearch Installing Chinese word segmentation plugin IK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.