Lucene.Net  3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
Classes | Public Member Functions | Properties | List of all members
Lucene.Net.Search.FilteredQuery Class Reference

A query that applies a filter to the results of another query. More...

Inherits Lucene.Net.Search.Query.

Public Member Functions

 FilteredQuery (Query query, Filter filter)
 Constructs a new query which applies a filter to the results of the original query. Filter.getDocIdSet() will be called every time this query is used in a search.
 
override Weight CreateWeight (Searcher searcher)
 Returns a Weight that applies the filter to the enclosed query's Weight. This is accomplished by overriding the Scorer returned by the Weight.
 
override Query Rewrite (IndexReader reader)
 Rewrites the wrapped 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 s)
 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 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 Query Query [get]
 
virtual Filter Filter [get]
 
- 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 applies a filter to the results of another query.

Note: the bits are retrieved from the filter each time this query is used in a search - use a CachingWrapperFilter to avoid regenerating the bits every time.

Created: Apr 20, 2004 8:58:29 AM

<since>1.4</since>

See Also
CachingWrapperFilter

Definition at line 39 of file FilteredQuery.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.FilteredQuery.FilteredQuery ( Query  query,
Filter  filter 
)

Constructs a new query which applies a filter to the results of the original query. Filter.getDocIdSet() will be called every time this query is used in a search.

Parameters
queryQuery to be filtered, cannot be null.
filterFilter to apply to query results, cannot be null.

Definition at line 216 of file FilteredQuery.cs.

Member Function Documentation

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

Returns a Weight that applies the filter to the enclosed query's Weight. This is accomplished by overriding the Scorer returned by the Weight.

Reimplemented from Lucene.Net.Search.Query.

Definition at line 225 of file FilteredQuery.cs.

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

Returns true iff o is equal to this.

Definition at line 277 of file FilteredQuery.cs.

override void Lucene.Net.Search.FilteredQuery.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 259 of file FilteredQuery.cs.

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

Returns a hash code value for this object.

Definition at line 288 of file FilteredQuery.cs.

override Query Lucene.Net.Search.FilteredQuery.Rewrite ( IndexReader  reader)
virtual

Rewrites the wrapped query.

Reimplemented from Lucene.Net.Search.Query.

Definition at line 233 of file FilteredQuery.cs.

override System.String Lucene.Net.Search.FilteredQuery.ToString ( System.String  s)
virtual

Prints a user-readable version of this query.

Implements Lucene.Net.Search.Query.

Definition at line 265 of file FilteredQuery.cs.

Property Documentation

virtual Filter Lucene.Net.Search.FilteredQuery.Filter
get

Definition at line 254 of file FilteredQuery.cs.

virtual Query Lucene.Net.Search.FilteredQuery.Query
get

Definition at line 249 of file FilteredQuery.cs.


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