Stefan4472 / simple-search-engine

GNU General Public License v3.0
0 stars 0 forks source link

Inverted Index performance improvements #22

Open Stefan4472 opened 2 years ago

Stefan4472 commented 2 years ago

See Python's bisect module, which we can use to better implement searching for doc_id in an InvertedList: https://www.tutorialspoint.com/python-inserting-item-in-sorted-list-maintaining-order

We can also use binary search to set our pointer to an arbitrary doc_id.

And: the file_id vs. doc_id thing is confusing.