Class ConstantScoreScorer


  • public final class ConstantScoreScorer
    extends Scorer
    A constant-scoring Scorer.
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Constructor Detail

      • ConstantScoreScorer

        public ConstantScoreScorer​(Weight weight,
                                   float score,
                                   DocIdSetIterator disi)
        Constructor based on a DocIdSetIterator which will be used to drive iteration. Two phase iteration will not be supported.
        Parameters:
        weight - the parent weight
        score - the score to return on each document
        disi - the iterator that defines matching documents
      • ConstantScoreScorer

        public ConstantScoreScorer​(Weight weight,
                                   float score,
                                   TwoPhaseIterator twoPhaseIterator)
        Constructor based on a TwoPhaseIterator. In that case the Scorer will support two-phase iteration.
        Parameters:
        weight - the parent weight
        score - the score to return on each document
        twoPhaseIterator - the iterator that defines matching documents