Why?Inverted indexWhat about it?
Because inverted indexes are currently the most common storage method for search enginesCore content!
In the actual reference of a search engine, you sometimes need to search for records based on certain values of the keywords.Index by keywordThis index is called:Inverted index,Files with inverted indexes are also called:Inverted index fileIt can also be called:Inverted FileTo achieve fast retrieval and high efficiency!
What is it?Inverted tableWhat about it?
Inverted FileThe secondary keyword index in is called:Inverted table
Its main advantages are:When processing complex multi-Keyword queries, you can perform logical operations such as query submission and query in the inverted table. After obtaining the results, you can access the records. In this way, you do not need to randomly access each record. You can convert the query of the record to the operation of the address set to increase the search speed!
The following is the creation process of the entire inverted table (group chart ):
Data Table
Index Table
Index table after right entry Merging
Then I finally asked whyHow to Create inverted IndexesWhat about it?
In fact, just like writing a novel, the directory is the page number corresponding to the Chapter title. For full-text search, the inverted index is the document number corresponding to the word!
The following is an example:
Case 1:
Normal document format: (search from file to keyword)
Ppt (from scratch...) ==> keywords1, keywords2, keywords3, keywords4, keywords5 ,.............
Case 2:
The result of inverted index flip is displayed: (from keyword to file search)
Keywords1, keyworkeywords2, keywords3, keywords4, keywords5, .............. (directly search for keywords and find the content page) ==> PPT
I wonder if you understand it! If it is not clear, the simplest example is as follows:
I think there are two ways to consider what we can read. One is from start to end! The other is to read the directory first and then directly go to the page to see what I need to see! Otherwise, what you want to see from the beginning is not a waste of time, like the first person ?? Directory plays a key role! This is because I understand it! If you still don't know, it doesn't matter if you look at the inverted table above.