Serializable, Cloneablepublic class PrefixQuery extends MultiTermQuery
app*.
This query uses the MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT
rewrite method.
MultiTermQuery.ConstantScoreAutoRewrite, MultiTermQuery.RewriteMethod, MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewriteCONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE| Constructor | Description |
|---|---|
PrefixQuery(Term prefix) |
Constructs a query for terms starting with
prefix. |
| Modifier and Type | Method | 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, setRewriteMethodfinalize, getClass, notify, notifyAll, wait, wait, waitclone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weightpublic PrefixQuery(Term prefix)
prefix.public Term getPrefix()
protected FilteredTermEnum getEnum(IndexReader reader) throws IOException
MultiTermQuerygetEnum in class MultiTermQueryIOExceptionpublic int hashCode()
hashCode in class MultiTermQuerypublic boolean equals(Object obj)
equals in class MultiTermQueryCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.