Package org.apache.lucene.search
Class WildcardTermEnum
- java.lang.Object
-
- org.apache.lucene.index.TermEnum
-
- org.apache.lucene.search.FilteredTermEnum
-
- org.apache.lucene.search.WildcardTermEnum
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class WildcardTermEnum extends FilteredTermEnum
Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.
-
-
Field Summary
Fields Modifier and Type Field Description static charWILDCARD_CHARstatic charWILDCARD_STRINGString equality with support for wildcards-
Fields inherited from class org.apache.lucene.search.FilteredTermEnum
actualEnum, currentTerm
-
-
Constructor Summary
Constructors Constructor Description WildcardTermEnum(IndexReader reader, Term term)Creates a newWildcardTermEnum.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description floatdifference()Equality measure on the termbooleanendEnum()Indicates the end of the enumeration has been reachedprotected booleantermCompare(Term term)Equality compare on the termstatic booleanwildcardEquals(String pattern, int patternIdx, String string, int stringIdx)Determines if a word matches a wildcard pattern.
-
-
-
Field Detail
-
WILDCARD_STRING
public static final char WILDCARD_STRING
String equality with support for wildcards- See Also:
- Constant Field Values
-
WILDCARD_CHAR
public static final char WILDCARD_CHAR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WildcardTermEnum
public WildcardTermEnum(IndexReader reader, Term term) throws IOException
Creates a newWildcardTermEnum.After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.
- Throws:
IOException
-
-
Method Detail
-
termCompare
protected final boolean termCompare(Term term)
Description copied from class:FilteredTermEnumEquality compare on the term- Specified by:
termComparein classFilteredTermEnum
-
difference
public float difference()
Description copied from class:FilteredTermEnumEquality measure on the term- Specified by:
differencein classFilteredTermEnum
-
endEnum
public final boolean endEnum()
Description copied from class:FilteredTermEnumIndicates the end of the enumeration has been reached- Specified by:
endEnumin classFilteredTermEnum
-
-