I was reading about the use of inverted indexes and I was trying to build a simple example to better understand how they work (I am most familar with PHP/MySQL). However, I am still unclear what the table structure would look like.
As far as I understand, there is a table called "dictionary " that has a column with each term being indexed (e.g., cat, dog, rat) and another with a reference to a posting list for each term. Fuurther that the posting list points to specific docIDs for each document where the term appears and that it is structured as a linked list (e.g., value/next-pointer chains).
- I assume each term/posting list would be its own table, correct?
- I am very confused about what columns would be in the posting list table. I know docID is one but what else, why? A next-pointer column? why?
I am leaving out term-frequency and position-in-doc stuff to simplify the example.
As far as I understand, there is a table called "dictionary " that has a column with each term being indexed (e.g., cat, dog, rat) and another with a reference to a posting list for each term. Fuurther that the posting list points to specific docIDs for each document where the term appears and that it is structured as a linked list (e.g., value/next-pointer chains).
- I assume each term/posting list would be its own table, correct?
- I am very confused about what columns would be in the posting list table. I know docID is one but what else, why? A next-pointer column? why?
I am leaving out term-frequency and position-in-doc stuff to simplify the example.
Comment