What if the Elasticsearchik plug-in can accurately query Chinese characters?

Source: Internet
Author: User
The following indexes are generated in Elasticsearch (ik): {code...} Elasticsearch (ik ):
Example structure:

Array (5) {["_ index"] => string (10) "n_index" ["_ type"] => string (9) "n_type" ["_ id"] => string (20) "AVXdrZDVceqO8Q-vidP2" ["_ score"] => float (0.5171687) ["_ source"] => array (5) {["id"] => int (111) ["title"] => string (82) "16 modern 300 top-level configuration in Beijing" }}" for example, I have created many index title fields as follows: "16 modern 300 top-level configuration in Beijing" 16 modern 300 top-level configuration in Beijing configure "" Beijing 16 KIA top-level configuration "" Beijing 16 300 top-level configuration "... How can I return the following results: "16 modern 300 top-level configurations in Beijing" and 16 modern 300 top-level configurations in Beijing"

Reply content:

The following indexes are generated in Elasticsearch (ik ).
Example structure:

Array (5) {["_ index"] => string (10) "n_index" ["_ type"] => string (9) "n_type" ["_ id"] => string (20) "AVXdrZDVceqO8Q-vidP2" ["_ score"] => float (0.5171687) ["_ source"] => array (5) {["id"] => int (111) ["title"] => string (82) "16 modern 300 top-level configuration in Beijing" }}" for example, I have created many index title fields as follows: "16 modern 300 top-level configuration in Beijing" 16 modern 300 top-level configuration in Beijing configure "" Beijing 16 KIA top-level configuration "" Beijing 16 300 top-level configuration "... How can I return the following results: "16 modern 300 top-level configurations in Beijing" and 16 modern 300 top-level configurations in Beijing"

GET/_ search {"query": {"match_phrase": {// match match_phrase word segmentation "title ": "16 modern 300 top-level configurations in Beijing "}}}

Try this structured query

  • List items

  • List items

  • List items

Currently, the keywords in word segmentation can be found in the example by https://github.com/medcl/elasticsearch-analysis-ik, but for example, the curl-XPOST http: // localhost: 9200/index/fulltext/4-d'
{"Content": "The Chinese consulate in Los Angeles has been shot by an Asian man and the suspect has surrendered "}
'
In this line, I want to find out through "Chinese man". can this es be implemented? Whether special configuration is required or (this configuration cannot be implemented in this example)

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.