Class CollectionStatistics


  • public class CollectionStatistics
    extends Object
    Contains statistics for a collection (field)
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • CollectionStatistics

        public CollectionStatistics​(String field,
                                    long maxDoc,
                                    long docCount,
                                    long sumTotalTermFreq,
                                    long sumDocFreq)
    • Method Detail

      • field

        public final String field()
        returns the field name
      • maxDoc

        public final long maxDoc()
        returns the total number of documents, regardless of whether they all contain values for this field.
        See Also:
        IndexReader.maxDoc()
      • docCount

        public final long docCount()
        returns the total number of documents that have at least one term for this field.
        See Also:
        Terms.getDocCount()
      • sumTotalTermFreq

        public final long sumTotalTermFreq()
        returns the total number of tokens for this field
        See Also:
        Terms.getSumTotalTermFreq()
      • sumDocFreq

        public final long sumDocFreq()
        returns the total number of postings for this field
        See Also:
        Terms.getSumDocFreq()