public class BasicStats extends Similarity.SimWeight
Modifier and Type | Field and Description |
---|---|
protected float |
avgFieldLength
The average field length.
|
protected float |
boost
A query boost.
|
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,
float boost)
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.
|
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 final float boost
public BasicStats(String field, float boost)
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 getBoost()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.