Package org.apache.lucene.search
Class FilteredQuery.FilterStrategy
- java.lang.Object
-
- org.apache.lucene.search.FilteredQuery.FilterStrategy
-
- Direct Known Subclasses:
FilteredQuery.RandomAccessFilterStrategy
- Enclosing class:
- FilteredQuery
public abstract static class FilteredQuery.FilterStrategy extends java.lang.ObjectAbstract class that defines how the filter (DocIdSet) applied during document collection.
-
-
Constructor Summary
Constructors Constructor Description FilterStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract ScorerfilteredScorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer, Weight weight, DocIdSet docIdSet)Returns a filteredScorerbased on this strategy.
-
-
-
Method Detail
-
filteredScorer
public abstract Scorer filteredScorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer, Weight weight, DocIdSet docIdSet) throws java.io.IOException
Returns a filteredScorerbased on this strategy.- Parameters:
context- theAtomicReaderContextfor which to return theScorer.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 supportDocIdSetIterator.nextDoc()and/orDocIdSetIterator.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/orDocIdSetIterator.advance(int)will be called.weight- theFilteredQueryWeightto create the filtered scorer.docIdSet- the filterDocIdSetto apply- Returns:
- a filtered scorer
- Throws:
java.io.IOException- if anIOExceptionoccurs
-
-