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 longprivate final DocsWithFieldSetprivate final FieldInfoprivate int[]private PackedLongValuesprivate int[](package private) final BytesRefHashprivate final Counterprivate intprivate final PackedLongValues.Builder -
Constructor Summary
ConstructorsConstructorDescriptionSortedDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed, ByteBlockPool pool) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddOneValue(BytesRef value) voidprivate voidfinish()voidflush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) (package private) SortedDocValues(package private) static DocValuesProducergetDocValuesProducer(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:
getDocValuesin 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:
flushin 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
-