Class MultiNormsLeafSimScorer


  • final class MultiNormsLeafSimScorer
    extends java.lang.Object
    Copy of LeafSimScorer that sums document's norms from multiple fields.
    • Constructor Detail

      • MultiNormsLeafSimScorer

        MultiNormsLeafSimScorer​(Similarity.SimScorer scorer,
                                LeafReader reader,
                                java.util.Collection<BM25FQuery.FieldAndWeight> normFields,
                                boolean needsScores)
                         throws java.io.IOException
        Sole constructor: Score documents of reader with scorer.
        Throws:
        java.io.IOException
    • Method Detail

      • getNormValue

        private long getNormValue​(int doc)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • score

        public float score​(int doc,
                           float freq)
                    throws java.io.IOException
        Score the provided document assuming the given term document frequency. This method must be called on non-decreasing sequences of doc ids.
        Throws:
        java.io.IOException
        See Also:
        Similarity.SimScorer.score(float, long)