java.lang.Object
org.apache.lucene.index.DocValuesWriter<SortedDocValues>
org.apache.lucene.index.SortedDocValuesWriter
Buffers up pending byte[] per doc, deref and sorting via int ord, then flushes when segment
flushes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private final DocsWithFieldSet
private final FieldInfo
private int[]
private PackedLongValues
private int[]
(package private) final BytesRefHash
private final Counter
private int
private final PackedLongValues.Builder
-
Constructor Summary
ConstructorsConstructorDescriptionSortedDocValuesWriter
(FieldInfo fieldInfo, Counter iwBytesUsed, ByteBlockPool pool) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addOneValue
(BytesRef value) void
private void
finish()
void
flush
(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) (package private) SortedDocValues
(package private) static DocValuesProducer
getDocValuesProducer
(FieldInfo writerFieldInfo, BytesRefHash hash, PackedLongValues ords, int[] sortedValues, int[] ordMap, DocsWithFieldSet docsWithField, Sorter.DocMap sortMap) private static int[]
sortDocValues
(int maxDoc, Sorter.DocMap sortMap, SortedDocValues oldValues) private void
-
Field Details
-
hash
-
pending
-
docsWithField
-
iwBytesUsed
-
bytesUsed
private long bytesUsed -
fieldInfo
-
lastDocID
private int lastDocID -
finalOrds
-
finalSortedValues
private int[] finalSortedValues -
finalOrdMap
private int[] finalOrdMap
-
-
Constructor Details
-
SortedDocValuesWriter
-
-
Method Details
-
addValue
-
addOneValue
-
updateBytesUsed
private void updateBytesUsed() -
finish
private void finish() -
getDocValues
SortedDocValues getDocValues()- Specified by:
getDocValues
in classDocValuesWriter<SortedDocValues>
-
sortDocValues
private static int[] sortDocValues(int maxDoc, Sorter.DocMap sortMap, SortedDocValues oldValues) throws IOException - Throws:
IOException
-
flush
public void flush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) throws IOException - Specified by:
flush
in classDocValuesWriter<SortedDocValues>
- Throws:
IOException
-
getDocValuesProducer
static DocValuesProducer getDocValuesProducer(FieldInfo writerFieldInfo, BytesRefHash hash, PackedLongValues ords, int[] sortedValues, int[] ordMap, DocsWithFieldSet docsWithField, Sorter.DocMap sortMap) throws IOException - Throws:
IOException
-