Methods Summary |
---|
final void | firstPosition()
count = tp.freq(); // read first pos
nextPosition();
|
final boolean | next() // increments to next doc
if (!tp.next()) {
tp.close(); // close stream
doc = Integer.MAX_VALUE; // sentinel value
return false;
}
doc = tp.doc();
position = 0;
return true;
|
final boolean | nextPosition()Go to next location of this term current document, and set
position as location - offset , so that a
matching exact phrase is easily identified when all PhrasePositions
have exactly the same position .
if (count-- > 0) { // read subsequent pos's
position = tp.nextPosition() - offset;
return true;
} else
return false;
|
final boolean | skipTo(int target)
if (!tp.skipTo(target)) {
tp.close(); // close stream
doc = Integer.MAX_VALUE; // sentinel value
return false;
}
doc = tp.doc();
position = 0;
return true;
|