public static class FilteredQuery.RandomAccessFilterStrategy extends FilteredQuery.FilterStrategy
FilteredQuery.FilterStrategy that conditionally uses a random access filter if
the given DocIdSet supports random access (returns a non-null value
from DocIdSet.bits()) and
useRandomAccess(Bits, int) returns
true. Otherwise this strategy falls back to a "zig-zag join" (
FilteredQuery.LEAP_FROG_FILTER_FIRST_STRATEGY) strategy .| Constructor and Description |
|---|
RandomAccessFilterStrategy() |
| Modifier and Type | Method and Description |
|---|---|
Scorer |
filteredScorer(AtomicReaderContext context,
boolean scoreDocsInOrder,
boolean topScorer,
Weight weight,
DocIdSet docIdSet)
Returns a filtered
Scorer based on this strategy. |
public Scorer filteredScorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer, Weight weight, DocIdSet docIdSet) throws IOException
FilteredQuery.FilterStrategyScorer based on this strategy.filteredScorer in class FilteredQuery.FilterStrategycontext - the AtomicReaderContext for which to return the Scorer.scoreDocsInOrder - specifies whether in-order scoring of documents is required. Note
that if set to false (i.e., out-of-order scoring is required),
this method can return whatever scoring mode it supports, as every
in-order scorer is also an out-of-order one. However, an
out-of-order scorer may not support DocIdSetIterator.nextDoc()
and/or DocIdSetIterator.advance(int), therefore it is recommended to
request an in-order scorer if use of these methods is required.topScorer - if true, Scorer.score(Collector) will be called; if false,
DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int) will
be called.weight - the FilteredQuery Weight to create the filtered scorer.docIdSet - the filter DocIdSet to applyIOException - if an IOException occursCopyright © 2010 - 2020 Adobe. All Rights Reserved