org.apache.lucene.search
Class MultiTermQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.search.MultiTermQuery
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- FuzzyQuery, WildcardQuery
public abstract class MultiTermQuery extends Query
AQuerythat matches documents containing a subset of terms provided by aFilteredTermEnumenumeration.MultiTermQueryis not designed to be used by itself.
The reason being that it is not intialized with aFilteredTermEnumenumeration. AFilteredTermEnumenumeration needs to be provided.For example,
WildcardQueryandFuzzyQueryextendMultiTermQueryto provideWildcardTermEnumandFuzzyTermEnum, respectively.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description MultiTermQuery(Term term)Constructs a query for terms matchingterm.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)TermgetTerm()Returns the pattern term.inthashCode()Queryrewrite(IndexReader reader)Expert: called to re-write queries into primitive queries.java.lang.StringtoString(java.lang.String field)Prints a user-readable version of this query.-
Methods inherited from class org.apache.lucene.search.Query
clone, combine, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
-
-
-
-
Constructor Detail
-
MultiTermQuery
public MultiTermQuery(Term term)
Constructs a query for terms matchingterm.
-
-
Method Detail
-
getTerm
public Term getTerm()
Returns the pattern term.
-
rewrite
public Query rewrite(IndexReader reader) throws java.io.IOException
Description copied from class:QueryExpert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
-
toString
public java.lang.String toString(java.lang.String field)
Prints a user-readable version of this query.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG