Package org.apache.lucene.index
Class SortedNumericDocValuesWriter
- java.lang.Object
-
- org.apache.lucene.index.DocValuesWriter<SortedNumericDocValues>
-
- org.apache.lucene.index.SortedNumericDocValuesWriter
-
class SortedNumericDocValuesWriter extends DocValuesWriter<SortedNumericDocValues>
Buffers up pending long[] per doc, sorts, then flushes when segment flushes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSortedNumericDocValuesWriter.BufferedSortedNumericDocValues(package private) static classSortedNumericDocValuesWriter.LongValues(package private) static classSortedNumericDocValuesWriter.SortingSortedNumericDocValues
-
Field Summary
Fields Modifier and Type Field Description private longbytesUsedprivate intcurrentDocprivate intcurrentUptoprivate long[]currentValuesprivate DocsWithFieldSetdocsWithFieldprivate FieldInfofieldInfoprivate PackedLongValuesfinalValuesprivate PackedLongValuesfinalValuesCountprivate CounteriwBytesUsedprivate PackedLongValues.Builderpendingprivate PackedLongValues.BuilderpendingCounts
-
Constructor Summary
Constructors Constructor Description SortedNumericDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddOneValue(long value)voidaddValue(int docID, long value)private voidfinishCurrentDoc()voidflush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer)(package private) SortedNumericDocValuesgetDocValues()private voidupdateBytesUsed()
-
-
-
Field Detail
-
pending
private PackedLongValues.Builder pending
-
pendingCounts
private PackedLongValues.Builder pendingCounts
-
docsWithField
private DocsWithFieldSet docsWithField
-
iwBytesUsed
private final Counter iwBytesUsed
-
bytesUsed
private long bytesUsed
-
fieldInfo
private final FieldInfo fieldInfo
-
currentDoc
private int currentDoc
-
currentValues
private long[] currentValues
-
currentUpto
private int currentUpto
-
finalValues
private PackedLongValues finalValues
-
finalValuesCount
private PackedLongValues finalValuesCount
-
-
Method Detail
-
addValue
public void addValue(int docID, long value)
-
finishCurrentDoc
private void finishCurrentDoc()
-
addOneValue
private void addOneValue(long value)
-
updateBytesUsed
private void updateBytesUsed()
-
getDocValues
SortedNumericDocValues getDocValues()
- Specified by:
getDocValuesin classDocValuesWriter<SortedNumericDocValues>
-
flush
public void flush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) throws java.io.IOException
- Specified by:
flushin classDocValuesWriter<SortedNumericDocValues>- Throws:
java.io.IOException
-
-