org.apache.lucene.search

## Class LeafSimScorer

- java.lang.Object
- - org.apache.lucene.search.LeafSimScorer

-     public final class LeafSimScorer
      extends Object

  `Similarity.SimScorer` on a specific `LeafReader`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LeafSimScorer(Similarity.SimScorer scorer, LeafReader reader, String field, boolean needsScores)` Sole constructor: Score documents of `reader` with `scorer`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Explanation` | `explain(int doc, Explanation freqExpl)` Explain the score for the provided document assuming the given term document frequency.
    `Similarity.SimScorer` | `getSimScorer()` Return the wrapped `Similarity.SimScorer`.
    `float` | `score(int doc, float freq)` Score the provided document assuming the given term document frequency.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LeafSimScorer

          public LeafSimScorer(Similarity.SimScorer scorer,
                               LeafReader reader,
                               String field,
                               boolean needsScores)
                        throws IOException

      Sole constructor: Score documents of `reader` with `scorer`.
      Throws:
        `IOException`

  - ### Method Detail

    - #### getSimScorer

          public Similarity.SimScorer getSimScorer()

      Return the wrapped `Similarity.SimScorer`.

    - #### score

          public float score(int doc,
                             float freq)
                      throws IOException

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

    - #### explain

          public Explanation explain(int doc,
                                     Explanation freqExpl)
                              throws IOException

      Explain the score for the provided document assuming the given term document frequency. This method must be called on non-decreasing sequences of doc ids.
      Throws:
        `IOException`
      See Also:
        `Similarity.SimScorer.explain(Explanation, long)`

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.