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 | Protected Member Functions | Properties | List of all members
Lucene.Net.Search.FilteredDocIdSet Class Referenceabstract

Abstract decorator class for a DocIdSet implementation that provides on-demand filtering/validation mechanism on a given DocIdSet. More...

Inherits Lucene.Net.Search.DocIdSet.

Inherited by Lucene.Net.Search.CachingWrapperFilter.AnonymousFilterCache.AnonymousFilteredDocIdSet, and Lucene.Net.Spatial.Util.ValueSourceFilter.ValueSourceFilteredDocIdSet.

Public Member Functions

abstract bool Match (int docid)
 Validation method to determine whether a docid should be in the result set.
 
override DocIdSetIterator Iterator ()
 Implementation of the contract to build a DocIdSetIterator.
 

Protected Member Functions

 FilteredDocIdSet (DocIdSet innerSet)
 Constructor.
 

Properties

override bool IsCacheable [get]
 This DocIdSet implementation is cacheable if the inner set is cacheable.
 
- Properties inherited from Lucene.Net.Search.DocIdSet
virtual bool IsCacheable [get]
 This method is a hint for CachingWrapperFilter, if this DocIdSet should be cached without copying it into a BitSet. The default is to return false. If you have an own DocIdSet implementation that does its iteration very effective and fast without doing disk I/O, override this method and return true.
 

Additional Inherited Members

- Static Public Attributes inherited from Lucene.Net.Search.DocIdSet
static readonly DocIdSet EMPTY_DOCIDSET
 An empty DocIdSet instance for easy use, e.g. in Filters that hit no documents.
 

Detailed Description

Abstract decorator class for a DocIdSet implementation that provides on-demand filtering/validation mechanism on a given DocIdSet.

Technically, this same functionality could be achieved with ChainedFilter (under contrib/misc), however the benefit of this class is it never materializes the full bitset for the filter. Instead, the Match method is invoked on-demand, per docID visited during searching. If you know few docIDs will be visited, and the logic behind Match is relatively costly, this may be a better way to filter than ChainedFilter.

See Also
DocIdSet

Definition at line 42 of file FilteredDocIdSet.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.FilteredDocIdSet.FilteredDocIdSet ( DocIdSet  innerSet)
protected

Constructor.

Parameters
innerSetUnderlying DocIdSet

Definition at line 78 of file FilteredDocIdSet.cs.

Member Function Documentation

override DocIdSetIterator Lucene.Net.Search.FilteredDocIdSet.Iterator ( )
virtual

Implementation of the contract to build a DocIdSetIterator.

See Also
DocIdSetIterator
See Also
FilteredDocIdSetIterator

Implements Lucene.Net.Search.DocIdSet.

Definition at line 102 of file FilteredDocIdSet.cs.

abstract bool Lucene.Net.Search.FilteredDocIdSet.Match ( int  docid)
pure virtual

Validation method to determine whether a docid should be in the result set.

Parameters
dociddocid to be tested
Returns
true if input docid should be in the result set, false otherwise.

Implemented in Lucene.Net.Spatial.Util.ValueSourceFilter.ValueSourceFilteredDocIdSet.

Property Documentation

override bool Lucene.Net.Search.FilteredDocIdSet.IsCacheable
get

This DocIdSet implementation is cacheable if the inner set is cacheable.

Definition at line 85 of file FilteredDocIdSet.cs.


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