Class FilteredQuery.RandomAccessFilterStrategy
A FilteredQuery.FilterStrategy that conditionally uses a random access filter if the given DocIdSet supports random access (returns a non-null value from Bits) and UseRandomAccess(IBits, Int32) returns
true
. Otherwise this strategy falls back to a "zig-zag join" (
LEAP_FROG_FILTER_FIRST_STRATEGY) strategy .
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public class RandomAccessFilterStrategy : FilteredQuery.FilterStrategy
Methods
| Improve this Doc View SourceFilteredScorer(AtomicReaderContext, Weight, DocIdSet)
Declaration
public override Scorer FilteredScorer(AtomicReaderContext context, Weight weight, DocIdSet docIdSet)
Parameters
Type | Name | Description |
---|---|---|
AtomicReaderContext | context | |
Weight | weight | |
DocIdSet | docIdSet |
Returns
Type | Description |
---|---|
Scorer |
Overrides
| Improve this Doc View SourceUseRandomAccess(IBits, Int32)
Expert: decides if a filter should be executed as "random-access" or not. Random-access means the filter "filters" in a similar way as deleted docs are filtered in Lucene. This is faster when the filter accepts many documents. However, when the filter is very sparse, it can be faster to execute the query+filter as a conjunction in some cases.
The default implementation returns true
if the first document accepted by the
filter is < 100.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected virtual bool UseRandomAccess(IBits bits, int firstFilterDoc)
Parameters
Type | Name | Description |
---|---|---|
IBits | bits | |
System.Int32 | firstFilterDoc |
Returns
Type | Description |
---|---|
System.Boolean |