Cloud computing platform (Search)-elasticsearch-Search

Source: Internet
Author: User

Elasticsearch mainly queries the data in the index:

1. indexreader opens the index file, reads and opens the stream pointing to the index file.

2. user input query statement

3. Convert the query statement to the query object tree.

4. Construct the weight object tree to calculate the term weight of a word, that is, the section in the calculation scoring formula that is irrelevant to the document (the red part) only related to the search statement ).

5. Construct the scorer object tree for scoring (termscorer. Score ()).

6. When constructing the scorer Object Tree, the termscorer of its leaf node reads the dictionary and inverted table from the index.

7. Construct the sumscorer object tree to facilitate the merging of inverted tables to the new organization of the scorer object tree. Its leaf node is still termscorer, including dictionary and inverted table. In this step, the inverted table is merged to obtain the result document set, and the blue part of the score formula is calculated for the result document. The sum in the score formula is not a simple addition, but the sum of scores for subqueries Based on the merging method (and or not) of the inverted table in the subquery, and the score of the parent query is calculated.

8. Return the collection and score of the collected results to the user.

 

There are already many articles in the specific process. I will reference a blog post:

7. Lucene search process analysis (1)

Http://www.cnblogs.com/forfuture1978/archive/2010/04/04/1704242.html

7. Lucene search process analysis (2)

Http://www.cnblogs.com/forfuture1978/archive/2010/04/04/1704245.html

7. Lucene search process analysis (3)

Http://www.cnblogs.com/forfuture1978/archive/2010/04/04/1704250.html

7. Lucene search process analysis (4)

Http://www.cnblogs.com/forfuture1978/archive/2010/04/04/1704254.html

7. Lucene search process analysis (5)

Http://www.cnblogs.com/forfuture1978/archive/2010/04/04/1704258.html

7. Lucene search process analysis (6)

Http://www.cnblogs.com/forfuture1978/archive/2010/04/04/1704263.html

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.