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.