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 | List of all members
Lucene.Net.Spatial.Util.TermsFilter Class Reference

Constructs a filter for docs matching any of the terms added to this class. Unlike a RangeFilter this can be used for filtering on multiple terms that are not necessarily in a sequence. An example might be a collection of primary keys from a database query result or perhaps a choice of "category" labels picked by the end user. As a filter, this is much faster than the equivalent query (a BooleanQuery with many "should" TermQueries) More...

Inherits Lucene.Net.Search.Filter.

Public Member Functions

void AddTerm (Term term)
 Adds a term to the list of acceptable terms
 
override DocIdSet GetDocIdSet (IndexReader reader)
 
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Detailed Description

Constructs a filter for docs matching any of the terms added to this class. Unlike a RangeFilter this can be used for filtering on multiple terms that are not necessarily in a sequence. An example might be a collection of primary keys from a database query result or perhaps a choice of "category" labels picked by the end user. As a filter, this is much faster than the equivalent query (a BooleanQuery with many "should" TermQueries)

Definition at line 33 of file TermsFilter.cs.

Member Function Documentation

void Lucene.Net.Spatial.Util.TermsFilter.AddTerm ( Term  term)

Adds a term to the list of acceptable terms

Parameters
term

Definition at line 41 of file TermsFilter.cs.

override bool Lucene.Net.Spatial.Util.TermsFilter.Equals ( object  obj)

Definition at line 84 of file TermsFilter.cs.

override DocIdSet Lucene.Net.Spatial.Util.TermsFilter.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 46 of file TermsFilter.cs.

override int Lucene.Net.Spatial.Util.TermsFilter.GetHashCode ( )

Definition at line 107 of file TermsFilter.cs.


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