Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » search » [javadoc | source]
org.apache.lucene.search
abstract public class: MultiTermQuery [javadoc | source]
java.lang.Object
   org.apache.lucene.search.Query
      org.apache.lucene.search.MultiTermQuery

All Implemented Interfaces:
    Cloneable, Serializable

Direct Known Subclasses:
    WildcardQuery, RegexQuery, FuzzyQuery

A 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:
 public MultiTermQuery(Term term) 
    Constructs a query for terms matching term.
Method from org.apache.lucene.search.MultiTermQuery Summary:
equals,   getEnum,   getTerm,   hashCode,   rewrite,   toString
Methods from org.apache.lucene.search.Query:
clone,   combine,   createWeight,   extractTerms,   getBoost,   getSimilarity,   mergeBooleanQueries,   rewrite,   setBoost,   toString,   toString,   weight
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.search.MultiTermQuery Detail:
 public boolean equals(Object o) 
 abstract protected FilteredTermEnum getEnum(IndexReader reader) throws IOException
    Construct the enumeration to be used, expanding the pattern term.
 public Term getTerm() 
    Returns the pattern term.
 public int hashCode() 
 public Query rewrite(IndexReader reader) throws IOException 
 public String toString(String field) 
    Prints a user-readable version of this query.