Package org.apache.lucene.index
Class NumericDocValuesWriter
- java.lang.Object
-
- org.apache.lucene.index.DocValuesWriter<NumericDocValues>
-
- org.apache.lucene.index.NumericDocValuesWriter
-
class NumericDocValuesWriter extends DocValuesWriter<NumericDocValues>
Buffers up pending long per doc, then flushes when segment flushes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classNumericDocValuesWriter.BufferedNumericDocValues(package private) static classNumericDocValuesWriter.NumericDVs(package private) static classNumericDocValuesWriter.SortingNumericDocValues
-
Field Summary
Fields Modifier and Type Field Description private longbytesUsedprivate DocsWithFieldSetdocsWithFieldprivate FieldInfofieldInfoprivate PackedLongValuesfinalValuesprivate CounteriwBytesUsedprivate intlastDocIDprivate PackedLongValues.Builderpending
-
Constructor Summary
Constructors Constructor Description NumericDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(int docID, long value)voidflush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer)(package private) NumericDocValuesgetDocValues()(package private) static NumericDocValuesWriter.NumericDVssortDocValues(int maxDoc, Sorter.DocMap sortMap, NumericDocValues oldDocValues)private voidupdateBytesUsed()
-
-
-
Field Detail
-
pending
private PackedLongValues.Builder pending
-
finalValues
private PackedLongValues finalValues
-
iwBytesUsed
private final Counter iwBytesUsed
-
bytesUsed
private long bytesUsed
-
docsWithField
private DocsWithFieldSet docsWithField
-
fieldInfo
private final FieldInfo fieldInfo
-
lastDocID
private int lastDocID
-
-
Method Detail
-
addValue
public void addValue(int docID, long value)
-
updateBytesUsed
private void updateBytesUsed()
-
getDocValues
NumericDocValues getDocValues()
- Specified by:
getDocValuesin classDocValuesWriter<NumericDocValues>
-
sortDocValues
static NumericDocValuesWriter.NumericDVs sortDocValues(int maxDoc, Sorter.DocMap sortMap, NumericDocValues oldDocValues) throws java.io.IOException
- Throws:
java.io.IOException
-
flush
public void flush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) throws java.io.IOException
- Specified by:
flushin classDocValuesWriter<NumericDocValues>- Throws:
java.io.IOException
-
-