org.apache.lucene.search.similarities

## Class Similarity.ExactSimScorer

- java.lang.Object
- - org.apache.lucene.search.similarities.Similarity.ExactSimScorer

- Enclosing class:
    Similarity

      public abstract static class Similarity.ExactSimScorer
      extends Object

  API for scoring exact queries such as `TermQuery` and exact `PhraseQuery`.

  Frequencies are integers (the term or phrase frequency within the document)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Similarity.ExactSimScorer()` Sole constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Explanation` | `explain(int doc, Explanation freq)` Explain the score for a single document
    `abstract float` | `score(int doc, int freq)` Score a single document

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

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

- - ### Constructor Detail

    - #### Similarity.ExactSimScorer

          public Similarity.ExactSimScorer()

      Sole constructor. (For invocation by subclass constructors, typically implicit.)

  - ### Method Detail

    - #### score

          public abstract float score(int doc,
                    int freq)

      Score a single document
      Parameters:
        `doc` - document id
        `freq` - term frequency
      Returns:
        document's score

    - #### explain

          public Explanation explain(int doc,
                            Explanation freq)

      Explain the score for a single document
      Parameters:
        `doc` - document id
        `freq` - Explanation of how the term frequency was computed
      Returns:
        document's score

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