org.apache.lucene.search

Class MultiTermQuery

public abstract class MultiTermQuery extends Query

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 Summary
MultiTermQuery(Term term)
Constructs a query for terms matching term.
Method Summary
booleanequals(Object o)
protected abstract FilteredTermEnumgetEnum(IndexReader reader)
Construct the enumeration to be used, expanding the pattern term.
TermgetTerm()
Returns the pattern term.
inthashCode()
Queryrewrite(IndexReader reader)
StringtoString(String field)
Prints a user-readable version of this query.

Constructor Detail

MultiTermQuery

public MultiTermQuery(Term term)
Constructs a query for terms matching term.

Method Detail

equals

public boolean equals(Object o)

getEnum

protected abstract FilteredTermEnum getEnum(IndexReader reader)
Construct the enumeration to be used, expanding the pattern term.

getTerm

public Term getTerm()
Returns the pattern term.

hashCode

public int hashCode()

rewrite

public Query rewrite(IndexReader reader)

toString

public String toString(String field)
Prints a user-readable version of this query.
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.