Install Elasticsearch in Windows environment, Ik,head,marvel

Source: Internet
Author: User

Reference: http://blog.csdn.net/xiedongdong1/article/details/52848645

Elasticsearch Document: https://www.elastic.co/guide/cn/elasticsearch/guide/current/intro.html

Elasticsearch with the middle division word breaker will make the Chinese into a single word, need to install IK participle, ik participle is divided into ik_smart (the most fine-grained word), ik_max_word (the most coarse-grained word) two modes.

1: First install elasticsearch: Download elasticsearch zip version Https://www.elastic.co/downloads/elasticsearch

2: Unzip the downloaded zip package, start Elasticsearch, there are two ways:

2.1: Go to the bin directory of the extracted files, double-click Execute Elasticsearch.bat

Enter http://localhost:9200 and the following page appears, indicating that the installation was successful.

  

Press CTRL + C to stop

2.2: Install into Windows service, enter the bin command line interface, execute executable program Elasticsearch-service-x64.exe, become system service

3: Install head Plug-in, manage and monitor the status of the cluster on the webpage, Elasticsearch-head is an interface cluster operation and management tool

The 3.1 5.0 version was previously installed via the Elasticsearch plugin plug-in and entered the Bin directory for installation: elasticsearch/bin/plugin -install mobz/elasticsearch-head

3.2 5.0 does not support command-line installation later, support for installing node. JS is required. Installation Method http://blog.csdn.net/qq3401247010/article/details/78742524

4: Install the IK word-breaker

First download the compiled code in git, be sure to choose and your own ES version of the corresponding, otherwise unable to start the service, git as follows:

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

The contents of the extracted files are then placed in the ES plugins Analysis-ik directory, and if there is no this directory, the new.

Finally, add Index.analysis.analyzer.ik.type to the end of elasticsearch.yml file in es conf: "IK"

To test whether a word breaker can be participle:

In the browser input:

Http://localhost:9200/_analyze?analyzer=ik&pretty=true&text= China National Anthem

Result: {"tokens": [{"token": "People's Republic", "Start_offset": 0, "End_offset": 7, "type": "Cn_word", "position": 0},{"Tok En ":" Chinese People "," Start_offset ": 0," End_offset ": 4," type ":" Cn_word "," position ": 1},{" token ":" Zhonghua "," Start_offset " : 0, "End_offset": 2, "type": "Cn_word", "position": 2},{"token": "Chinese", "Start_offset": 1, "End_offset": 3, "type" : "Cn_word", "position": 3},{"token": "People's Republic", "Start_offset": 2, "End_offset": 7, "type": "Cn_word", "position": 4},{"token": "People", "Start_offset": 2, "End_offset": 4, "type": "Cn_word", "position": 5},{"token": "Republic", "star T_offset ": 4," End_offset ": 7," type ":" Cn_word "," position ": 6},{" token ":" Republic "," Start_offset ": 4," End_offset ": 6, "type": "Cn_word", "Position": 7}, {"token": "Country", "Start_offset": 6, "End_offset": 7, "type": "Cn_char", "posit Ion ": 8},{" token ":" National anthem "," Start_offset ": 7," End_offset ": 9," type ":" Cn_word "," Position ": 9}]} If you want a coarse-grained word breaker: then an ANA Lyzer properties can be changed to Ik_smart &nbsP;http://localhost:9200/_analyze?analyzer=ik_smart&pretty=true&text= People's Republic of China National anthem result: {"tokens": [{"token": " People's Republic of China "," Start_offset ": 0," End_offset ": 7," type ":" Cn_word "," position ": 0},{" token ":" National anthem "," Start_offset ": 7, "End_offset": 9, "type": "Cn_word", "Position": 1}]}

Install Elasticsearch in Windows environment, Ik,head,marvel

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.