C# Класс 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.

Наследование: Lucene.Net.Search.DocIdSet
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
FilteredDocIdSet ( Lucene.Net.Search.DocIdSet innerSet )

Constructor.

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

Implementation of the contract to build a DocIdSetIterator.

Защищенные методы

Метод Описание
Match ( int docid ) : bool

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

Описание методов

FilteredDocIdSet() публичный Метод

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

GetBits() публичный Метод

public GetBits ( ) : Lucene.Net.Util.Bits
Результат Lucene.Net.Util.Bits

GetIterator() публичный Метод

Implementation of the contract to build a DocIdSetIterator.
public GetIterator ( ) : DocIdSetIterator
Результат DocIdSetIterator

Match() защищенный абстрактный Метод

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
Результат bool