Class DisjunctionSumScorer


  • final class DisjunctionSumScorer
    extends DisjunctionScorer
    A Scorer for OR like queries, counterpart of ConjunctionScorer.
    • Field Detail

      • scorers

        private final java.util.List<Scorer> scorers
    • Constructor Detail

      • DisjunctionSumScorer

        DisjunctionSumScorer​(Weight weight,
                             java.util.List<Scorer> subScorers,
                             ScoreMode scoreMode)
                      throws java.io.IOException
        Construct a DisjunctionScorer.
        Parameters:
        weight - The weight to be used.
        subScorers - Array of at least two subscorers.
        Throws:
        java.io.IOException
    • Method Detail

      • score

        protected float score​(DisiWrapper topList)
                       throws java.io.IOException
        Description copied from class: DisjunctionScorer
        Compute the score for the given linked list of scorers.
        Specified by:
        score in class DisjunctionScorer
        Throws:
        java.io.IOException
      • advanceShallow

        public int advanceShallow​(int target)
                           throws java.io.IOException
        Description copied from class: Scorer
        Advance to the block of documents that contains target in order to get scoring information about this block. This method is implicitly called by DocIdSetIterator.advance(int) and DocIdSetIterator.nextDoc() on the returned doc ID. Calling this method doesn't modify the current DocIdSetIterator.docID(). It returns a number that is greater than or equal to all documents contained in the current block, but less than any doc IDS of the next block. target must be >= Scorable.docID() as well as all targets that have been passed to Scorer.advanceShallow(int) so far.
        Overrides:
        advanceShallow in class Scorer
        Throws:
        java.io.IOException
      • getMaxScore

        public float getMaxScore​(int upTo)
                          throws java.io.IOException
        Description copied from class: Scorer
        Return the maximum score that documents between the last target that this iterator was shallow-advanced to included and upTo included.
        Specified by:
        getMaxScore in class Scorer
        Throws:
        java.io.IOException