mirror of https://github.com/apache/lucene.git
LUCENE-1680: make prefix Term accessible
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@783370 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e3c3d443a8
commit
2c351e832e
|
@ -15,7 +15,7 @@ import org.apache.lucene.index.Term;
|
|||
*/
|
||||
public class PrefixTermEnum extends FilteredTermEnum {
|
||||
|
||||
private Term prefix;
|
||||
private final Term prefix;
|
||||
private boolean endEnum = false;
|
||||
|
||||
public PrefixTermEnum(IndexReader reader, Term prefix) throws IOException {
|
||||
|
@ -31,6 +31,10 @@ public class PrefixTermEnum extends FilteredTermEnum {
|
|||
protected boolean endEnum() {
|
||||
return endEnum;
|
||||
}
|
||||
|
||||
protected Term getPrefixTerm() {
|
||||
return prefix;
|
||||
}
|
||||
|
||||
protected boolean termCompare(Term term) {
|
||||
if (term.field() == prefix.field() && term.text().startsWith(prefix.text())) {
|
||||
|
|
Loading…
Reference in New Issue