Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Classes | Public Member Functions | Properties | List of all members
Lucene.Net.Search.TermQuery Class Reference

A Query that matches documents containing a term. This may be combined with other terms with a BooleanQuery. More...

Inherits Lucene.Net.Search.Query.

Inherited by Lucene.Net.Search.FuzzyLikeThisQuery.FuzzyTermQuery.

Public Member Functions

 TermQuery (Term t)
 Constructs a query for the term t.
 
override Weight CreateWeight (Searcher searcher)
 Expert: Constructs an appropriate Weight implementation for this query.
 
override void ExtractTerms (System.Collections.Generic.ISet< Term > terms)
 Expert: adds all terms occuring in this query to the terms set. Only works if this query is in its rewritten form.
 
override System.String ToString (System.String field)
 Prints a user-readable version of this query.
 
override bool Equals (System.Object o)
 Returns true iff o is equal to this.
 
override int GetHashCode ()
 Returns a hash code value for this object.
 
- Public Member Functions inherited from Lucene.Net.Search.Query
override System.String ToString ()
 Prints a query to a string.
 
virtual Weight Weight (Searcher searcher)
 Expert: Constructs and initializes a Weight for a top-level query.
 
virtual Query Rewrite (IndexReader reader)
 Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
 
virtual Query Combine (Query[] queries)
 Expert: called when re-writing queries under MultiSearcher.
 
virtual Similarity GetSimilarity (Searcher searcher)
 Expert: Returns the Similarity implementation to be used for this query. Subclasses may override this method to specify their own Similarity implementation, perhaps one that delegates through that of the Searcher. By default the Searcher's Similarity implementation is returned.
 
virtual System.Object Clone ()
 Returns a clone of this query.
 
override int GetHashCode ()
 
override bool Equals (System.Object obj)
 

Properties

virtual Term Term [get]
 Returns the term of this query.
 
- Properties inherited from Lucene.Net.Search.Query
virtual float Boost [get, set]
 Gets or sets the boost for this query clause to b. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by b. The boost is 1.0 by default.
 

Additional Inherited Members

- Static Public Member Functions inherited from Lucene.Net.Search.Query
static Query MergeBooleanQueries (params BooleanQuery[] queries)
 Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.
 

Detailed Description

A Query that matches documents containing a term. This may be combined with other terms with a BooleanQuery.

Definition at line 33 of file TermQuery.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.TermQuery.TermQuery ( Term  t)

Constructs a query for the term t.

Definition at line 187 of file TermQuery.cs.

Member Function Documentation

override Weight Lucene.Net.Search.TermQuery.CreateWeight ( Searcher  searcher)
virtual

Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Reimplemented from Lucene.Net.Search.Query.

Definition at line 198 of file TermQuery.cs.

override bool Lucene.Net.Search.TermQuery.Equals ( System.Object  o)

Returns true iff o is equal to this.

Definition at line 223 of file TermQuery.cs.

override void Lucene.Net.Search.TermQuery.ExtractTerms ( System.Collections.Generic.ISet< Term terms)
virtual

Expert: adds all terms occuring in this query to the terms set. Only works if this query is in its rewritten form.

<throws> UnsupportedOperationException if this query is not yet rewritten </throws>

Reimplemented from Lucene.Net.Search.Query.

Definition at line 203 of file TermQuery.cs.

override int Lucene.Net.Search.TermQuery.GetHashCode ( )

Returns a hash code value for this object.

Definition at line 232 of file TermQuery.cs.

override System.String Lucene.Net.Search.TermQuery.ToString ( System.String  field)
virtual

Prints a user-readable version of this query.

Implements Lucene.Net.Search.Query.

Definition at line 209 of file TermQuery.cs.

Property Documentation

virtual Term Lucene.Net.Search.TermQuery.Term
get

Returns the term of this query.

Definition at line 194 of file TermQuery.cs.


The documentation for this class was generated from the following file: