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(Int32) method is invoked on-demand, per docID visited during searching. If you know few docIDs will be visited, and the logic behind Match(Int32) 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
| Improve this Doc View SourceFilteredDocIdSet(DocIdSet)
Constructor.
Declaration
public FilteredDocIdSet(DocIdSet innerSet)
Parameters
Type | Name | Description |
---|---|---|
DocIdSet | innerSet | Underlying DocIdSet |
Properties
| Improve this Doc View SourceBits
Declaration
public override IBits Bits { get; }
Property Value
Type | Description |
---|---|
IBits |
Overrides
| Improve this Doc View SourceIsCacheable
This DocIdSet implementation is cacheable if the inner set is cacheable.
Declaration
public override bool IsCacheable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Methods
| Improve this Doc View SourceGetIterator()
Implementation of the contract to build a DocIdSetIterator.
Declaration
public override DocIdSetIterator GetIterator()
Returns
Type | Description |
---|---|
DocIdSetIterator |
Overrides
See Also
| Improve this Doc View SourceMatch(Int32)
Validation method to determine whether a docid should be in the result set.
Declaration
protected abstract bool Match(int docid)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | docid | docid to be tested |
Returns
Type | Description |
---|---|
System.Boolean |
|