Package 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
Description
`LMStats(String field, double boost)`
Creates LMStats for the provided field and query-time boost

## Method Summary

Modifier and Type
Method
Description
`final double`
`getCollectionProbability()`
Returns the probability that the current term is generated by the collection.
`final 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 Details

### LMStats

public LMStats(String field, double boost)
Creates LMStats for the provided field and query-time boost

## Method Details

### 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.