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, docFreq, numberOfDocuments, numberOfFieldTokens, queryBoost, topLevelBoost, totalBoost, totalTermFreq`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LMSimilarity.LMStats(String field, float queryBoost)` Creates LMStats for the provided field and query-time boost

  - ### Method Summary

    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, getDocFreq, getNumberOfDocuments, getNumberOfFieldTokens, getTotalBoost, getTotalTermFreq, getValueForNormalization, normalize, rawNormalizationValue, 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

    - #### LMSimilarity.LMStats

          public LMSimilarity.LMStats(String field,
                              float queryBoost)

      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-2013 Apache Software Foundation. All Rights Reserved.