Corrected comments and changed a variable name in SegmentTermPositions to better reflect the meaning of the variable

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@517007 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Busch 2007-03-11 20:29:19 +00:00
parent 0b706b4688
commit 11fb1314e6
1 changed files with 11 additions and 11 deletions

View File

@ -30,7 +30,7 @@ extends SegmentTermDocs implements TermPositions {
// these variables are being used to remember information
// for a lazy skip
private long lazySkipPointer = 0;
private int lazySkipDocCount = 0;
private int lazySkipProxCount = 0;
SegmentTermPositions(SegmentReader p) {
super(p);
@ -42,7 +42,7 @@ extends SegmentTermDocs implements TermPositions {
if (ti != null)
lazySkipPointer = ti.proxPointer;
lazySkipDocCount = 0;
lazySkipProxCount = 0;
proxCount = 0;
}
@ -59,14 +59,14 @@ extends SegmentTermDocs implements TermPositions {
}
protected final void skippingDoc() throws IOException {
// we remember to skip the remaining positions of the current
// document lazily
lazySkipDocCount += freq;
// we remember to skip a document lazily
lazySkipProxCount += freq;
}
public final boolean next() throws IOException {
// we remember to skip a document lazily
lazySkipDocCount += proxCount;
// we remember to skip the remaining positions of the current
// document lazily
lazySkipProxCount += proxCount;
if (super.next()) { // run super
proxCount = freq; // note frequency
@ -85,7 +85,7 @@ extends SegmentTermDocs implements TermPositions {
protected void skipProx(long proxPointer) throws IOException {
// we save the pointer, we might have to skip there lazily
lazySkipPointer = proxPointer;
lazySkipDocCount = 0;
lazySkipProxCount = 0;
proxCount = 0;
}
@ -115,9 +115,9 @@ extends SegmentTermDocs implements TermPositions {
lazySkipPointer = 0;
}
if (lazySkipDocCount != 0) {
skipPositions(lazySkipDocCount);
lazySkipDocCount = 0;
if (lazySkipProxCount != 0) {
skipPositions(lazySkipProxCount);
lazySkipProxCount = 0;
}
}