Package org.apache.lucene.index
Class SortedNumericDocValuesWriter
- java.lang.Object
-
- org.apache.lucene.index.DocValuesWriter
-
- org.apache.lucene.index.SortedNumericDocValuesWriter
-
class SortedNumericDocValuesWriter extends DocValuesWriter
Buffers up pending long[] per doc, sorts, then flushes when segment flushes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SortedNumericDocValuesWriter.BufferedSortedNumericDocValues
-
Field Summary
Fields Modifier and Type Field Description private long
bytesUsed
private int
currentDoc
private int
currentUpto
private long[]
currentValues
private DocsWithFieldSet
docsWithField
private FieldInfo
fieldInfo
private PackedLongValues
finalValues
private PackedLongValues
finalValuesCount
private Counter
iwBytesUsed
private PackedLongValues.Builder
pending
private PackedLongValues.Builder
pendingCounts
-
Constructor Summary
Constructors Constructor Description SortedNumericDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addOneValue(long value)
void
addValue(int docID, long value)
void
finish(int maxDoc)
private void
finishCurrentDoc()
void
flush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer)
(package private) Sorter.DocComparator
getDocComparator(int maxDoc, SortField sortField)
(package private) DocIdSetIterator
getDocIdSet()
private long[][]
sortDocValues(int maxDoc, Sorter.DocMap sortMap, SortedNumericDocValues oldValues)
private void
updateBytesUsed()
-
-
-
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()
-
finish
public void finish(int maxDoc)
- Specified by:
finish
in classDocValuesWriter
-
addOneValue
private void addOneValue(long value)
-
updateBytesUsed
private void updateBytesUsed()
-
getDocComparator
Sorter.DocComparator getDocComparator(int maxDoc, SortField sortField) throws java.io.IOException
- Specified by:
getDocComparator
in classDocValuesWriter
- Throws:
java.io.IOException
-
sortDocValues
private long[][] sortDocValues(int maxDoc, Sorter.DocMap sortMap, SortedNumericDocValues oldValues) 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
-
getDocIdSet
DocIdSetIterator getDocIdSet()
- Specified by:
getDocIdSet
in classDocValuesWriter
-
-