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
Afficher le fichier Open project: apache/lucenenet Class Usage Examples

Méthodes publiques

Méthode Description
FilteredDocIdSet ( Lucene.Net.Search.DocIdSet innerSet )

Constructor.

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

Implementation of the contract to build a DocIdSetIterator.

Méthodes protégées

Méthode Description
Match ( int docid ) : bool

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

Method Details

FilteredDocIdSet() public méthode

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

GetBits() public méthode

public GetBits ( ) : Lucene.Net.Util.Bits
Résultat Lucene.Net.Util.Bits

GetIterator() public méthode

Implementation of the contract to build a DocIdSetIterator.
public GetIterator ( ) : DocIdSetIterator
Résultat DocIdSetIterator

Match() protected abstract méthode

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
Résultat bool