Methods Summary |
---|
public final void | close()
super.close();
proxStream.close();
|
private void | lazySkip()
if (lazySkipPointer != 0) {
proxStream.seek(lazySkipPointer);
lazySkipPointer = 0;
}
if (lazySkipDocCount != 0) {
skipPositions(lazySkipDocCount);
lazySkipDocCount = 0;
}
|
public final boolean | next()
// we remember to skip a document lazily
lazySkipDocCount += proxCount;
if (super.next()) { // run super
proxCount = freq; // note frequency
position = 0; // reset position
return true;
}
return false;
|
public final int | nextPosition()
// perform lazy skips if neccessary
lazySkip();
proxCount--;
return position += proxStream.readVInt();
|
public final int | read(int[] docs, int[] freqs)
throw new UnsupportedOperationException("TermPositions does not support processing multiple documents in one call. Use TermDocs instead.");
|
final void | seek(org.apache.lucene.index.TermInfo ti)
super.seek(ti);
if (ti != null)
lazySkipPointer = ti.proxPointer;
lazySkipDocCount = 0;
proxCount = 0;
|
private void | skipPositions(int n)
for (int f = n; f > 0; f--) // skip unread positions
proxStream.readVInt();
|
protected void | skipProx(long proxPointer)Called by super.skipTo().
// we save the pointer, we might have to skip there lazily
lazySkipPointer = proxPointer;
lazySkipDocCount = 0;
proxCount = 0;
|
protected final void | skippingDoc()
// we remember to skip the remaining positions of the current
// document lazily
lazySkipDocCount += freq;
|