C# Class Lucene.Net.Search.FilteredDocIdSet

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 queries/), 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.

Inheritance: Lucene.Net.Search.DocIdSet
Show file Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
FilteredDocIdSet ( Lucene.Net.Search.DocIdSet innerSet )

Constructor.

GetBits ( ) : Lucene.Net.Util.Bits
GetIterator ( ) : DocIdSetIterator

Implementation of the contract to build a DocIdSetIterator.

Protected Methods

Method Description
Match ( int docid ) : bool

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

Method Details

FilteredDocIdSet() public method

Constructor.
public FilteredDocIdSet ( Lucene.Net.Search.DocIdSet innerSet )
innerSet Lucene.Net.Search.DocIdSet Underlying DocIdSet

GetBits() public method

public GetBits ( ) : Lucene.Net.Util.Bits
return Lucene.Net.Util.Bits

GetIterator() public method

Implementation of the contract to build a DocIdSetIterator.
public GetIterator ( ) : DocIdSetIterator
return DocIdSetIterator

Match() protected abstract method

Validation method to determine whether a docid should be in the result set.
protected abstract Match ( int docid ) : bool
docid int docid to be tested
return bool