mirror of https://github.com/apache/lucene.git
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:
parent
0b706b4688
commit
11fb1314e6
|
@ -30,7 +30,7 @@ extends SegmentTermDocs implements TermPositions {
|
||||||
// these variables are being used to remember information
|
// these variables are being used to remember information
|
||||||
// for a lazy skip
|
// for a lazy skip
|
||||||
private long lazySkipPointer = 0;
|
private long lazySkipPointer = 0;
|
||||||
private int lazySkipDocCount = 0;
|
private int lazySkipProxCount = 0;
|
||||||
|
|
||||||
SegmentTermPositions(SegmentReader p) {
|
SegmentTermPositions(SegmentReader p) {
|
||||||
super(p);
|
super(p);
|
||||||
|
@ -42,7 +42,7 @@ extends SegmentTermDocs implements TermPositions {
|
||||||
if (ti != null)
|
if (ti != null)
|
||||||
lazySkipPointer = ti.proxPointer;
|
lazySkipPointer = ti.proxPointer;
|
||||||
|
|
||||||
lazySkipDocCount = 0;
|
lazySkipProxCount = 0;
|
||||||
proxCount = 0;
|
proxCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,14 +59,14 @@ extends SegmentTermDocs implements TermPositions {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final void skippingDoc() throws IOException {
|
protected final void skippingDoc() throws IOException {
|
||||||
// we remember to skip the remaining positions of the current
|
// we remember to skip a document lazily
|
||||||
// document lazily
|
lazySkipProxCount += freq;
|
||||||
lazySkipDocCount += freq;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean next() throws IOException {
|
public final boolean next() throws IOException {
|
||||||
// we remember to skip a document lazily
|
// we remember to skip the remaining positions of the current
|
||||||
lazySkipDocCount += proxCount;
|
// document lazily
|
||||||
|
lazySkipProxCount += proxCount;
|
||||||
|
|
||||||
if (super.next()) { // run super
|
if (super.next()) { // run super
|
||||||
proxCount = freq; // note frequency
|
proxCount = freq; // note frequency
|
||||||
|
@ -85,7 +85,7 @@ extends SegmentTermDocs implements TermPositions {
|
||||||
protected void skipProx(long proxPointer) throws IOException {
|
protected void skipProx(long proxPointer) throws IOException {
|
||||||
// we save the pointer, we might have to skip there lazily
|
// we save the pointer, we might have to skip there lazily
|
||||||
lazySkipPointer = proxPointer;
|
lazySkipPointer = proxPointer;
|
||||||
lazySkipDocCount = 0;
|
lazySkipProxCount = 0;
|
||||||
proxCount = 0;
|
proxCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,9 +115,9 @@ extends SegmentTermDocs implements TermPositions {
|
||||||
lazySkipPointer = 0;
|
lazySkipPointer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lazySkipDocCount != 0) {
|
if (lazySkipProxCount != 0) {
|
||||||
skipPositions(lazySkipDocCount);
|
skipPositions(lazySkipProxCount);
|
||||||
lazySkipDocCount = 0;
|
lazySkipProxCount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue