public class BasicStats extends Similarity.SimWeight
Modifier and Type | Field and Description |
---|---|
protected float |
avgFieldLength
The average field length.
|
protected float |
boost
For most Similarities, the immediate and the top level query boosts are
not handled differently.
|
protected long |
docFreq
The document frequency.
|
protected long |
numberOfDocuments
The number of documents.
|
protected long |
numberOfFieldTokens
The total number of tokens in the field.
|
protected long |
totalTermFreq
The total number of occurrences of this term across all documents.
|
Constructor and Description |
---|
BasicStats(String field)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
float |
getAvgFieldLength()
Returns the average field length.
|
float |
getBoost()
Returns the total boost.
|
long |
getDocFreq()
Returns the document frequency.
|
long |
getNumberOfDocuments()
Returns the number of documents.
|
long |
getNumberOfFieldTokens()
Returns the total number of tokens in the field.
|
long |
getTotalTermFreq()
Returns the total number of occurrences of this term across all documents.
|
float |
getValueForNormalization()
The square of the raw normalization value.
|
void |
normalize(float queryNorm,
float boost)
No normalization is done.
|
protected float |
rawNormalizationValue()
Computes the raw normalization value.
|
void |
setAvgFieldLength(float avgFieldLength)
Sets the average field length.
|
void |
setDocFreq(long docFreq)
Sets the document frequency.
|
void |
setNumberOfDocuments(long numberOfDocuments)
Sets the number of documents.
|
void |
setNumberOfFieldTokens(long numberOfFieldTokens)
Sets the total number of tokens in the field.
|
void |
setTotalTermFreq(long totalTermFreq)
Sets the total number of occurrences of this term across all documents.
|
protected long numberOfDocuments
protected long numberOfFieldTokens
protected float avgFieldLength
protected long docFreq
protected long totalTermFreq
protected float boost
public BasicStats(String field)
public long getNumberOfDocuments()
public void setNumberOfDocuments(long numberOfDocuments)
public long getNumberOfFieldTokens()
Terms.getSumTotalTermFreq()
public void setNumberOfFieldTokens(long numberOfFieldTokens)
Terms.getSumTotalTermFreq()
public float getAvgFieldLength()
public void setAvgFieldLength(float avgFieldLength)
public long getDocFreq()
public void setDocFreq(long docFreq)
public long getTotalTermFreq()
public void setTotalTermFreq(long totalTermFreq)
public float getValueForNormalization()
getValueForNormalization
in class Similarity.SimWeight
rawNormalizationValue()
protected float rawNormalizationValue()
normalize(float, float)
, etc.public void normalize(float queryNorm, float boost)
boost
is saved in the object, however.normalize
in class Similarity.SimWeight
public float getBoost()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.