Class OffsetsAccumulator

java.lang.Object
org.elasticsearch.index.codec.tsdb.OffsetsAccumulator
All Implemented Interfaces:
Closeable, AutoCloseable

public final class OffsetsAccumulator extends Object implements Closeable
Builds the doc values address offset table iteratively, one document at a time. Useful to avoid a separate docvalues iteration to build the address offset table.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OffsetsAccumulator(org.apache.lucene.store.Directory dir, org.apache.lucene.store.IOContext context, org.apache.lucene.store.IndexOutput data, long numDocsWithField, int directMonotonicBlockShift)
    Creates a new accumulator for doc values address offsets.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addDoc(int docValueCount)
     
    void
    build(org.apache.lucene.store.IndexOutput meta, org.apache.lucene.store.IndexOutput data)
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OffsetsAccumulator

      public OffsetsAccumulator(org.apache.lucene.store.Directory dir, org.apache.lucene.store.IOContext context, org.apache.lucene.store.IndexOutput data, long numDocsWithField, int directMonotonicBlockShift) throws IOException
      Creates a new accumulator for doc values address offsets.
      Parameters:
      dir - the directory for temporary files
      context - the IO context
      data - the data output
      numDocsWithField - the number of documents with a value for this field
      directMonotonicBlockShift - the block shift for address/offset encoding via DirectMonotonicWriter
      Throws:
      IOException
  • Method Details