Traversing the inverted index core classes: SegmentTermDocs / SegmentTermPositions

When a word acquired yuan, to traverse the word element inverted index data (what the document contains the term, the word cell location in each document) when is SegmentTermDocs / SegmentTermPositions these two classes work when.

SegmentTermDocs responsible through all the documents in one word the cell belongs; SegmentTermPositions responsible for all traversing a word meta position in a document. SegmentTermPositions have SegmentTermDocs additional functionality through inheritance SegmentTermDocs. So, If you want to traverse the cell belongs word document and location, then use SegmentTermPositions directly on the line.

 

Guess you like

Origin www.cnblogs.com/caiyao/p/12056789.html