mirror of
https://github.com/apache/lucene.git
synced 2025-02-10 12:05:36 +00:00
LUCENE-2843: fix silly ob1 in the index term selectors
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1061230 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ca0598b3e7
commit
fb20497e42
@ -76,7 +76,7 @@ public class VariableGapTermsIndexWriter extends TermsIndexWriterBase {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isIndexTerm(BytesRef term, TermStats stats) {
|
public boolean isIndexTerm(BytesRef term, TermStats stats) {
|
||||||
if (count >= interval) {
|
if (count >= interval) {
|
||||||
count = 0;
|
count = 1;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
count++;
|
count++;
|
||||||
@ -101,7 +101,7 @@ public class VariableGapTermsIndexWriter extends TermsIndexWriterBase {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isIndexTerm(BytesRef term, TermStats stats) {
|
public boolean isIndexTerm(BytesRef term, TermStats stats) {
|
||||||
if (stats.docFreq >= docFreqThresh || count >= interval) {
|
if (stats.docFreq >= docFreqThresh || count >= interval) {
|
||||||
count = 0;
|
count = 1;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
count++;
|
count++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user