title: How to build a simple inverted index?
body: <p>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.</p>
  
  <p>Now, I have several questions:</p>
  
  <ol>
  <li><p>What kind of data structure is often used for building inverted index? Multidimensional list?</p></li>
  <li><p>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?</p></li>
  </ol>