Class MultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery>

All Implemented Interfaces:
Accountable

final class MultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery> extends AbstractMultiTermQueryConstantScoreWrapper<Q>
This class provides the functionality behind MultiTermQuery.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.
  • Constructor Details

    • MultiTermQueryConstantScoreWrapper

      MultiTermQueryConstantScoreWrapper(Q query)
  • Method Details

    • createWeight

      public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws 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 class Query
      Parameters:
      scoreMode - How the produced scorers will be consumed.
      boost - The boost that is propagated by the parent queries.
      Throws:
      IOException