elasticsearch Chinese word summary of the course

Official website: https: //github.com/medcl/elasticsearch-analysis-ik

Process Summary:

1, windows, linux is first downloaded ik, and unzip to elasticsearch plugin directory;

2, restart elasticsearch

3, create an index, creating an index is equivalent to creating a database.

curl -XPUT http://localhost:9200/index

4, set index word, it can be used kibana -> del tools, or curl

POST /index/*/_mapping
{
  "properties": 
  {
    "content": 
    {
      "type": "text",
      "analyzer": "ik_max_word",
      "search_analyzer": "ik_max_word"
    }
  }
}

 

5, word test results.

Note: you need to set its word search and word ways for each index, and then test the word will be effective.

Guess you like

Origin www.cnblogs.com/yanketao/p/10967181.html