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
Public Member Functions | Properties | List of all members
Lucene.Net.Search.MultiTermQueryWrapperFilter< T > Class Template Reference

A wrapper for MultiTermQuery, that exposes its functionality as a Filter. MultiTermQueryWrapperFilter is not designed to be used by itself. Normally you subclass it to provide a Filter counterpart for a MultiTermQuery subclass. For example, TermRangeFilter and PrefixFilter extend MultiTermQueryWrapperFilter. This class also provides the functionality behind MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE; this is why it is not abstract. More...

Inherits Lucene.Net.Search.Filter.

Inherited by Lucene.Net.Search.NumericRangeFilter< T >, Lucene.Net.Search.PrefixFilter, and Lucene.Net.Search.TermRangeFilter.

Public Member Functions

override System.String ToString ()
 
override bool Equals (System.Object o)
 
override int GetHashCode ()
 
virtual void ClearTotalNumberOfTerms ()
 Expert: Resets the counting of unique terms. Do this before executing the filter.
 
override DocIdSet GetDocIdSet (IndexReader reader)
 
 

Properties

virtual int TotalNumberOfTerms [get]
 Expert: Return the number of unique terms visited during execution of the filter. If there are many of them, you may consider using another filter type or optimize your total term count in index. This method is not thread safe, be sure to only call it when no filter is running! If you re-use the same filter instance for another search, be sure to first reset the term counter with ClearTotalNumberOfTerms.
 

Detailed Description

A wrapper for MultiTermQuery, that exposes its functionality as a Filter.

MultiTermQueryWrapperFilter is not designed to be used by itself. Normally you subclass it to provide a Filter counterpart for a MultiTermQuery subclass.

For example, TermRangeFilter and PrefixFilter extend MultiTermQueryWrapperFilter. This class also provides the functionality behind MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE; this is why it is not abstract.

Type Constraints
T :MultiTermQuery 

Definition at line 43 of file MultiTermQueryWrapperFilter.cs.

Member Function Documentation

virtual void Lucene.Net.Search.MultiTermQueryWrapperFilter< T >.ClearTotalNumberOfTerms ( )
virtual

Expert: Resets the counting of unique terms. Do this before executing the filter.

See Also
TotalNumberOfTerms

Definition at line 101 of file MultiTermQueryWrapperFilter.cs.

override bool Lucene.Net.Search.MultiTermQueryWrapperFilter< T >.Equals ( System.Object  o)

Definition at line 62 of file MultiTermQueryWrapperFilter.cs.

override DocIdSet Lucene.Net.Search.MultiTermQueryWrapperFilter< T >.GetDocIdSet ( IndexReader  reader)
virtual

Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

/summary>

Returns
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Parameters
readerA IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
See Also
DocIdBitSet

Implements Lucene.Net.Search.Filter.

Definition at line 106 of file MultiTermQueryWrapperFilter.cs.

override int Lucene.Net.Search.MultiTermQueryWrapperFilter< T >.GetHashCode ( )

Definition at line 76 of file MultiTermQueryWrapperFilter.cs.

override System.String Lucene.Net.Search.MultiTermQueryWrapperFilter< T >.ToString ( )

Definition at line 55 of file MultiTermQueryWrapperFilter.cs.

Property Documentation

virtual int Lucene.Net.Search.MultiTermQueryWrapperFilter< T >.TotalNumberOfTerms
get

Expert: Return the number of unique terms visited during execution of the filter. If there are many of them, you may consider using another filter type or optimize your total term count in index. This method is not thread safe, be sure to only call it when no filter is running! If you re-use the same filter instance for another search, be sure to first reset the term counter with ClearTotalNumberOfTerms.

See Also
ClearTotalNumberOfTerms

Definition at line 92 of file MultiTermQueryWrapperFilter.cs.


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