Java Lookup Algorithm (three): Inverted index

Source: Internet
Author: User

[What is inverted index]

Index: Just like the catalogue of books, we can quickly find the corresponding chapters through the catalogue.

The inverted index stems from the fact that the actual application needs to find records based on the value of the attribute, for example, by finding the corresponding article through the words in the article.


[Inverted Index example]

Suppose there are three articles, the contents of which are:

Article 1:it is what it is

Article 2:what is it

Article 3:it is a banana

We can get the following inverted index table:

Key words
Your article
A {2}
Banana {2}
Is {0, 1, 2}
It {0, 1, 2}
What {0, 1}

after establishing the index table above, if you find the keyword "banana", we can quickly know it in article 2.


Java Lookup Algorithm (three): Inverted index

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.