org.apache.lucene.search.similarities

## Class LMSimilarity.LMStats

- java.lang.Object
- - org.apache.lucene.search.similarities.BasicStats
  - - org.apache.lucene.search.similarities.LMSimilarity.LMStats

- Enclosing class:
    LMSimilarity

      public static class LMSimilarity.LMStats
      extends BasicStats

  Stores the collection distribution of the current term.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.search.similarities.BasicStats

      `avgFieldLength, boost, docFreq, numberOfDocuments, numberOfFieldTokens, totalTermFreq`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LMStats(String field, double boost)` Creates LMStats for the provided field and query-time boost

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getCollectionProbability()` Returns the probability that the current term is generated by the collection.
    `void` | `setCollectionProbability(double collectionProbability)` Sets the probability that the current term is generated by the collection.

    - ### Methods inherited from class org.apache.lucene.search.similarities.BasicStats

      `getAvgFieldLength, getBoost, getDocFreq, getNumberOfDocuments, getNumberOfFieldTokens, getTotalTermFreq, setAvgFieldLength, setDocFreq, setNumberOfDocuments, setNumberOfFieldTokens, setTotalTermFreq`

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

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

- - ### Constructor Detail

    - #### LMStats

          public LMStats(String field,
                         double boost)

      Creates LMStats for the provided field and query-time boost

  - ### Method Detail

    - #### getCollectionProbability

          public final double getCollectionProbability()

      Returns the probability that the current term is generated by the collection.

    - #### setCollectionProbability

          public final void setCollectionProbability(double collectionProbability)

      Sets the probability that the current term is generated by the collection.

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