mirror of https://github.com/apache/lucene.git
leverage AcceptStatus.END
This commit is contained in:
parent
082a4c7436
commit
1f8c07553f
|
@ -149,18 +149,15 @@ public class PrefixQuery extends MultiTermQuery {
|
|||
|
||||
@Override
|
||||
protected BytesRef nextSeekTerm(BytesRef currentTerm) {
|
||||
if (currentTerm == null) {
|
||||
assert currentTerm == null;
|
||||
return startTerm;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcceptStatus accept(BytesRef candidate) {
|
||||
if (thresholdLength == candidate.length
|
||||
&& determinant == Byte.toUnsignedInt(candidate.bytes[candidate.offset + tdi])) {
|
||||
return AcceptStatus.NO_AND_SEEK;
|
||||
return AcceptStatus.END;
|
||||
} else {
|
||||
return AcceptStatus.YES;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue