public abstract class MultiTermQuery extends Query
Query
that matches documents containing a subset of terms provided
by a FilteredTermEnum
enumeration.
MultiTermQuery
is not designed to be used by itself.
The reason being that it is not intialized with a FilteredTermEnum
enumeration. A FilteredTermEnum
enumeration needs to be provided.
For example, WildcardQuery
and FuzzyQuery
extend
MultiTermQuery
to provide WildcardTermEnum
and
FuzzyTermEnum
, respectively.
Constructor and Description |
---|
MultiTermQuery(Term term)
Constructs a query for terms matching
term . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
protected abstract FilteredTermEnum |
getEnum(IndexReader reader)
Construct the enumeration to be used, expanding the pattern term.
|
Term |
getTerm()
Returns the pattern term.
|
int |
hashCode() |
Query |
rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
String |
toString(String field)
Prints a user-readable version of this query.
|
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
public MultiTermQuery(Term term)
term
.public Term getTerm()
protected abstract FilteredTermEnum getEnum(IndexReader reader) throws IOException
IOException
public Query rewrite(IndexReader reader) throws IOException
Query
rewrite
in class Query
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.