CollectionStatistics

constructor(field: String?, maxDoc: Long, docCount: Long, sumTotalTermFreq: Long, sumDocFreq: Long)

Parameters

field

Field's name.

This value is never null.

maxDoc

The total number of documents in the range [1 .. Long.MAX_VALUE], regardless of whether they all contain values for this field.

This value is always a positive number. @see IndexReader#maxDoc()

docCount

The total number of documents that have at least one term for this field , in the range [1 .. .maxDoc].

This value is always a positive number, and never exceeds .maxDoc. @see Terms#getDocCount()

sumTotalTermFreq

The total number of tokens for this field , in the range [.sumDocFreq .. Long.MAX_VALUE]. This is the "word count" for this field across all documents. It is the sum of TermStatistics.totalTermFreq across all terms. It is also the sum of each document's field length across all documents.

This value is always a positive number, and always at least .sumDocFreq. @see Terms#getSumTotalTermFreq()

sumDocFreq

The total number of posting list entries for this field, in the range [.docCount .. .sumTotalTermFreq]. This is the sum of term-document pairs: the sum of TermStatistics.docFreq across all terms. It is also the sum of each document's unique term count for this field across all documents.

This value is always a positive number, always at least .docCount, and never exceeds .sumTotalTermFreq. @see Terms#getSumDocFreq()