Module org.apache.lucene.core
Package org.apache.lucene.search
Class MultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery>
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.search.AbstractMultiTermQueryConstantScoreWrapper<Q>
-
- org.apache.lucene.search.MultiTermQueryConstantScoreWrapper<Q>
-
- All Implemented Interfaces:
Accountable
final class MultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery> extends AbstractMultiTermQueryConstantScoreWrapper<Q>
This class provides the functionality behindMultiTermQuery.CONSTANT_SCORE_REWRITE
. It tries to rewrite per-segment as a boolean query that returns a constant score and otherwise fills a bit set with matches and builds a Scorer on top of this bit set.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.AbstractMultiTermQueryConstantScoreWrapper
AbstractMultiTermQueryConstantScoreWrapper.RewritingWeight, AbstractMultiTermQueryConstantScoreWrapper.TermAndState, AbstractMultiTermQueryConstantScoreWrapper.WeightOrDocIdSetIterator
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.AbstractMultiTermQueryConstantScoreWrapper
BOOLEAN_REWRITE_TERM_COUNT_THRESHOLD, query
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description MultiTermQueryConstantScoreWrapper(Q query)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Weight
createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
Expert: Constructs an appropriate Weight implementation for this query.-
Methods inherited from class org.apache.lucene.search.AbstractMultiTermQueryConstantScoreWrapper
equals, getField, getQuery, hashCode, ramBytesUsed, toString, visit
-
Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, rewrite, sameClassAs, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Constructor Detail
-
MultiTermQueryConstantScoreWrapper
MultiTermQueryConstantScoreWrapper(Q query)
-
-
Method Detail
-
createWeight
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws java.io.IOException
Description copied from class:Query
Expert: Constructs an appropriate Weight implementation for this query.Only implemented by primitive queries, which re-write to themselves.
- Overrides:
createWeight
in classQuery
scoreMode
- How the produced scorers will be consumed.boost
- The boost that is propagated by the parent queries.- Throws:
java.io.IOException
-
-