TermStatistics

constructor(term: BytesRef, docFreq: Long, totalTermFreq: Long)

Parameters

term

Term bytes.

This value is never null.

docFreq

number of documents containing the term in the collection, in the range [1 .. .totalTermFreq].

This is the document-frequency for the term: the count of documents where the term appears at least one time.

This value is always a positive number, and never exceeds .totalTermFreq. It also cannot exceed CollectionStatistics.sumDocFreq. @see TermsEnum#docFreq()

totalTermFreq

number of occurrences of the term in the collection, in the range [.docFreq .. CollectionStatistics.sumTotalTermFreq].

This is the token count for the term: the number of times it appears in the field across all documents.

This value is always a positive number, always at least .docFreq, and never exceeds CollectionStatistics.sumTotalTermFreq. @see TermsEnum#totalTermFreq()