Home » lucene-3.0.1-src » org.apache » lucene » search » [javadoc | source]
public class: PrefixQuery [javadoc | source]

All Implemented Interfaces:
    Cloneable, Serializable

A Query that matches documents containing terms with a specified prefix. A PrefixQuery is built by QueryParser for input like app*.

This query uses the MultiTermQuery#CONSTANT_SCORE_AUTO_REWRITE_DEFAULT rewrite method.
Fields inherited from org.apache.lucene.search.MultiTermQuery:
 public PrefixQuery(Term prefix) 
    Constructs a query for terms starting with prefix.
Method from org.apache.lucene.search.PrefixQuery Summary:
equals,   getEnum,   getPrefix,   hashCode,   toString
Methods from org.apache.lucene.search.MultiTermQuery:
clearTotalNumberOfTerms,   equals,   getEnum,   getRewriteMethod,   getTotalNumberOfTerms,   hashCode,   incTotalNumberOfTerms,   rewrite,   setRewriteMethod
Methods from org.apache.lucene.search.Query:
clone,   combine,   createWeight,   equals,   extractTerms,   getBoost,   getSimilarity,   hashCode,   mergeBooleanQueries,   rewrite,   setBoost,   toString,   toString,   weight
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.search.PrefixQuery Detail:
 public boolean equals(Object obj) 
 protected FilteredTermEnum getEnum(IndexReader reader) throws IOException 
 public Term getPrefix() 
    Returns the prefix of this query.
 public int hashCode() 
 public String toString(String field) 
    Prints a user-readable version of this query.