Class MemoryCollectionStatistics

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.hadoop.io.Writable

    public class MemoryCollectionStatistics
    extends CollectionStatistics
    implements java.io.Serializable
    This class provides basic statistics in memory for a collection of documents, such as the average length of documents, or the total number of documents in the collection.
    Since:
    4.0
    Author:
    Richard McCreadie, Stuart Mackie
    See Also:
    Serialized Form
    • Constructor Detail

      • MemoryCollectionStatistics

        public MemoryCollectionStatistics​(int numDocs,
                                          int numTerms,
                                          long numTokens,
                                          long numPointers,
                                          long[] fieldTokens,
                                          java.lang.String[] fieldNames)
        Constructor.
    • Method Detail

      • update

        public void update​(int docs,
                           int tokens,
                           int terms)
        Increment doc, token and pointers counters.
      • updateUniqueTerms

        public void updateUniqueTerms​(int numTerms)
        Increment unique terms.
      • updateFields

        public void updateFields​(long[] ftokens)
        Increment field tokens.
      • relcaluate

        public void relcaluate()
        Relcaluate average lengths.