Class 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(int) method is invoked on-demand, per docID visited during searching. If you know few docIDs will be visited, and the logic behind Match(int) is relatively costly, this may be a better way to filter than ChainedFilter.
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public abstract class FilteredDocIdSet : DocIdSet
Constructors
FilteredDocIdSet(DocIdSet)
Constructor.
Declaration
protected FilteredDocIdSet(DocIdSet innerSet)
Parameters
Type | Name | Description |
---|---|---|
DocIdSet | innerSet | Underlying DocIdSet |
See Also
Properties
Bits
Optionally provides a IBits interface for random access to matching documents.
Declaration
public override IBits Bits { get; }
Property Value
Type | Description |
---|---|
IBits |
|
Overrides
See Also
IsCacheable
This DocIdSet implementation is cacheable if the inner set is cacheable.
Declaration
public override bool IsCacheable { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
See Also
Methods
GetIterator()
Implementation of the contract to build a DocIdSetIterator.
Declaration
public override DocIdSetIterator GetIterator()
Returns
Type | Description |
---|---|
DocIdSetIterator |
Overrides
See Also
Match(int)
Validation method to determine whether a docid should be in the result set.
Declaration
protected abstract bool Match(int docid)
Parameters
Type | Name | Description |
---|---|---|
int | docid | docid to be tested |
Returns
Type | Description |
---|---|
bool |
|