Search Engine Basics-Inverted index

Source: Internet
Author: User

Yesterday when I saw the Hadoop video in the Google search engine used in the inverted index technology, did not understand, today, read some documents finally feel dispel, the following from the user in the Google home page search this angle to explain.

First, the previous picture:

  

Simply put, when the user enters a keyword in the search box to click the Query button, the daemon first calculates the hash value of the queried word, and then goes to the hash table to find a match, each item of the hash table points to a hash conflict table, and the hash conflict list holds words with the same hash value. That is, the first step in the search is to get a list of words with the same hash value as the user's search keywords (conflict table). It then compares the words in the conflicting table with the user search terms to find exactly the words that match. Each word in the conflict table corresponds to an inverted list, such as:

  

This is the simplest inverted list, each word corresponding to a unique word ID, each document (that is, the page returned after the user searches) corresponds to a unique docid, and the inverted table records the documents in which each word appears. For example, the word-hopping, which appears in the document numbered 1,4, returns two pages numbered 1,4 as search results on a page.

Search Engine Basics-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.