check for == 0 rather than > 0
This commit is contained in:
parent
c18ae4a194
commit
6468c15446
|
@ -247,10 +247,8 @@ public final class OrdinalsBuilder implements Closeable {
|
||||||
return new FilteredTermsEnum(termsEnum, false) {
|
return new FilteredTermsEnum(termsEnum, false) {
|
||||||
@Override
|
@Override
|
||||||
protected AcceptStatus accept(BytesRef term) throws IOException {
|
protected AcceptStatus accept(BytesRef term) throws IOException {
|
||||||
if (NumericUtils.getPrefixCodedLongShift(term) > 0) {
|
// we stop accepting terms once we moved across the prefix codec terms - redundant values!
|
||||||
return AcceptStatus.END;
|
return NumericUtils.getPrefixCodedLongShift(term) == 0 ? AcceptStatus.YES : AcceptStatus.END;
|
||||||
} // we stop accepting terms once we moved across the prefix codec terms - redundant values!
|
|
||||||
return AcceptStatus.YES;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -264,10 +262,8 @@ public final class OrdinalsBuilder implements Closeable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected AcceptStatus accept(BytesRef term) throws IOException {
|
protected AcceptStatus accept(BytesRef term) throws IOException {
|
||||||
if (NumericUtils.getPrefixCodedIntShift(term) > 0) {
|
// we stop accepting terms once we moved across the prefix codec terms - redundant values!
|
||||||
return AcceptStatus.END;
|
return NumericUtils.getPrefixCodedIntShift(term) == 0 ? AcceptStatus.YES : AcceptStatus.END;
|
||||||
} // we stop accepting terms once we moved across the prefix codec terms - redundant values!
|
|
||||||
return AcceptStatus.YES;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue