sotheanithsok / Habeas

A complete implementation of large scale search engine including on-disk indexing, multiple queries options, and user interfaces.
MIT License
0 stars 0 forks source link

Reading The Index #55

Closed jblacklock closed 5 years ago

jblacklock commented 5 years ago

"You must create a new implementation of the Index interface, DiskPositionalIndex, which reads postings from an on-disk index as created by your DiskIndexWriter. Each Index interface method must be implemented; to program getPostings(String term), you must locate the byte position within the postings.bin file for the given term, which requires binary searching your vocabTable.bin (using vocab.bin as well). This is tricky; to get you started, I have implemented most of this behavior as part of some starter code in DiskFoundations.zip on BeachBoard. Once you have a byte location, use a seek method on a DataInputStream (Java) or BinaryReader (C#) to jump to that position and then read and translate integer values from disk into Postings objects in your program."

sellabae commented 5 years ago

implemented at pull request #68