public class PrefixQuery extends MultiTermQuery
app*
.
This query uses the MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT
rewrite method.
MultiTermQuery.ConstantScoreAutoRewrite, MultiTermQuery.RewriteMethod, MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewrite
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE
Constructor and Description |
---|
PrefixQuery(Term prefix)
Constructs a query for terms starting with
prefix . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
protected FilteredTermEnum |
getEnum(IndexReader reader)
Construct the enumeration to be used, expanding the pattern term.
|
Term |
getPrefix()
Returns the prefix of this query.
|
int |
hashCode() |
String |
toString(String field)
Prints a user-readable version of this query.
|
clearTotalNumberOfTerms, getRewriteMethod, getTotalNumberOfTerms, incTotalNumberOfTerms, rewrite, setRewriteMethod
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
public PrefixQuery(Term prefix)
prefix
.public Term getPrefix()
protected FilteredTermEnum getEnum(IndexReader reader) throws IOException
MultiTermQuery
getEnum
in class MultiTermQuery
IOException
public int hashCode()
hashCode
in class MultiTermQuery
public boolean equals(Object obj)
equals
in class MultiTermQuery