Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.lucene.index.TermEnum
org.apache.lucene.search.FilteredTermEnum
org.apache.lucene.search.WildcardTermEnum
public class WildcardTermEnum
extends FilteredTermEnum
Field Summary | |
static char | |
static char |
|
Constructor Summary | |
|
Method Summary | |
void |
|
float |
|
boolean |
|
protected boolean |
|
static boolean |
|
Methods inherited from class org.apache.lucene.search.FilteredTermEnum | |
close , difference , docFreq , endEnum , next , setEnum , term , termCompare |
public static final char WILDCARD_CHAR
- Field Value:
- '?'
public static final char WILDCARD_STRING
String equality with support for wildcards
- Field Value:
- '*'
public WildcardTermEnum(IndexReader reader, Term term) throws IOException
Creates a newWildcardTermEnum
. Passing in aTerm
that does not contain aWILDCARD_CHAR
will cause an exception to be thrown. After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.
public void close() throws IOException
Closes the enumeration to further activity, freeing resources.
- Overrides:
- close in interface FilteredTermEnum
public final float difference()
Equality measure on the term
- Overrides:
- difference in interface FilteredTermEnum
public final boolean endEnum()
Indicates the end of the enumeration has been reached
- Overrides:
- endEnum in interface FilteredTermEnum
protected final boolean termCompare(Term term)
Equality compare on the term
- Overrides:
- termCompare in interface FilteredTermEnum
public static final boolean wildcardEquals(String pattern, int patternIdx, String string, int stringIdx)
Determines if a word matches a wildcard pattern. Work released by Granta Design Ltd after originally being done on company time.