java.lang.Object
org.elasticsearch.index.codec.tsdb.OffsetsAccumulator
- All Implemented Interfaces:
Closeable,AutoCloseable
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
ConstructorsConstructorDescriptionOffsetsAccumulator(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
-
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 filescontext- the IO contextdata- the data outputnumDocsWithField- the number of documents with a value for this fielddirectMonotonicBlockShift- the block shift for address/offset encoding viaDirectMonotonicWriter- Throws:
IOException
-
-
Method Details
-
addDoc
- Throws:
IOException
-
build
public void build(org.apache.lucene.store.IndexOutput meta, org.apache.lucene.store.IndexOutput data) throws IOException - Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-