How to build a simple inverted index?
问题 I wanna build a simple indexing function of search engine without any API, such as Lucene. In the inverted index, I just need to record basic information of each word, e.g. docID, position, and freqence. Now, I have several questions: What kind of data structure is often used for building inverted index? Multidimensional list? After building the index, how to write it into files? What kind of format in the file? Like a table? Like drawing a index table on paper? 回答1: You can see a very simple