Package org.apache.lucene.index
Class NumericDocValuesWriter
- java.lang.Object
-
- org.apache.lucene.index.DocValuesWriter
-
- org.apache.lucene.index.NumericDocValuesWriter
-
class NumericDocValuesWriter extends DocValuesWriter
Buffers up pending long per doc, then flushes when segment flushes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
NumericDocValuesWriter.BufferedNumericDocValues
-
Field Summary
Fields Modifier and Type Field Description private long
bytesUsed
private DocsWithFieldSet
docsWithField
private FieldInfo
fieldInfo
private PackedLongValues
finalValues
private Counter
iwBytesUsed
private int
lastDocID
private PackedLongValues.Builder
pending
-
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 void
addValue(int docID, long value)
void
finish(int maxDoc)
void
flush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer)
(package private) Sorter.DocComparator
getDocComparator(int maxDoc, SortField sortField)
(package private) DocIdSetIterator
getDocIdSet()
(package private) static SortingLeafReader.CachedNumericDVs
sortDocValues(int maxDoc, Sorter.DocMap sortMap, NumericDocValues oldDocValues)
private void
updateBytesUsed()
-
-
-
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()
-
finish
public void finish(int maxDoc)
- Specified by:
finish
in classDocValuesWriter
-
getDocComparator
Sorter.DocComparator getDocComparator(int maxDoc, SortField sortField) throws java.io.IOException
- Specified by:
getDocComparator
in classDocValuesWriter
- Throws:
java.io.IOException
-
getDocIdSet
DocIdSetIterator getDocIdSet()
- Specified by:
getDocIdSet
in classDocValuesWriter
-
sortDocValues
static SortingLeafReader.CachedNumericDVs 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:
flush
in classDocValuesWriter
- Throws:
java.io.IOException
-
-