Package org.apache.lucene.index
Class SortedDocValuesWriter
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
void
flush
(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) (package private) SortedDocValues
private 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() -
getDocValues
SortedDocValues getDocValues()- Specified by:
getDocValues
in classDocValuesWriter<SortedDocValues>
-
sortDocValues
private 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
-