org.apache.lucene.search

Class TermQuery

public class TermQuery extends Query

A Query that matches documents containing a term. This may be combined with other terms with a {@link BooleanQuery}.
Constructor Summary
TermQuery(Term t)
Constructs a query for the term t.
Method Summary
protected WeightcreateWeight(Searcher searcher)
booleanequals(Object o)
Returns true iff o is equal to this.
TermgetTerm()
Returns the term of this query.
inthashCode()
Returns a hash code value for this object.
StringtoString(String field)
Prints a user-readable version of this query.

Constructor Detail

TermQuery

public TermQuery(Term t)
Constructs a query for the term t.

Method Detail

createWeight

protected Weight createWeight(Searcher searcher)

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

getTerm

public Term getTerm()
Returns the term of this query.

hashCode

public int hashCode()
Returns a hash code value for this object.

toString

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