org.apache.lucene.search.similarities

## Class LMSimilarity.LMStats

- java.lang.Object
- - org.apache.lucene.search.similarities.Similarity.SimWeight
  - - 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, float 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
    --- | ---
    `float` | `getCollectionProbability()` Returns the probability that the current term is generated by the collection.
    `void` | `setCollectionProbability(float 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,
                         float boost)

      Creates LMStats for the provided field and query-time boost

  - ### Method Detail

    - #### getCollectionProbability

          public final float getCollectionProbability()

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

    - #### setCollectionProbability

          public final void setCollectionProbability(float collectionProbability)

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

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