Elastic Search integration IK word, integrated spelling tokenizer

Integrated word breaker

Integrated IK Chinese word breaker

ES installation See Bowen ------------ "Elastic Search Getting Started"

  1. Download IK word breaker , select the corresponding version of zip compression version. Here to elasticsearch-analysis-ik-7.6.0.zip example.
  2. The zip archive uploaded to the server (/home/monk/Download/elasticsearch-analysis-ik-7.6.0.zip), to extract ES plugin directory (/apps/elasticsearch-7.6.0/plugins/elasticsearch-analysis- ik-7.6.0), as shown:unzip /home/monk/Download/elasticsearch-analysis-ik-7.6.0.zip -d /apps/elasticsearch-7.6.0/plugins/elasticsearch-analysis-ik-7.6.0/
    IK tokenizer
  3. ES can restart

Integrated Pinyin word breaker

  1. Download Pinyin word breaker , select the corresponding version of zip compression version. Here to elasticsearch-analysis-pinyin-7.6.0.zip A Case Study

  2. The zip archive uploaded to the server (/home/monk/Download/elasticsearch-analysis-pinyin-7.6.0.zip), to extract ES plugin directory (/apps/elasticsearch-7.6.0/plugins/elasticsearch-analysis- ik-7.6.0), as shown:unzip /home/monk/Download/elasticsearch-analysis-pinyin-7.6.0.zip -d /apps/elasticsearch-7.6.0/plugins/elasticsearch-analysis-pinyin-7.6.0/
    Here Insert Picture Description

  3. ES can restart

Verify successful integration

  • The default tokenizer effectHere Insert Picture Description
  • IK tokenizer effect
    • ik_max_word: text will do the finest split size, such as would "People's Republic of China national anthem" split "People's Republic of China, the Chinese people, the Chinese, the Chinese People's Republic, people, people, people, republic, republican, and, the country country, national anthem, "will exhaust all the possible combinations for Term Query;
    • ik_smart: do thickest split size, such will be "the national anthem of People's Republic of China" split "People's Republic of China, the national anthem," for Phrase queries.
      IK tokenizer effect
  • Pinyin word breaker effectPinyin word breaker effect
Published 69 original articles · won praise 3 · views 10000 +

Guess you like

Origin blog.csdn.net/Min_Monk/article/details/104535045