Package org.apache.lucene.index
Class SortedSetDocValuesWriter
java.lang.Object
org.apache.lucene.index.DocValuesWriter<SortedSetDocValues>
org.apache.lucene.index.SortedSetDocValuesWriter
Buffers up pending byte[]s per doc, deref and sorting via int ord, then flushes when segment
flushes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
(package private) static final class
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private int
private int
private int[]
private final DocsWithFieldSet
private final FieldInfo
private PackedLongValues
private int[]
private PackedLongValues
private int[]
(package private) final BytesRefHash
private final Counter
private int
private final PackedLongValues.Builder
private PackedLongValues.Builder
-
Constructor Summary
ConstructorsConstructorDescriptionSortedSetDocValuesWriter
(FieldInfo fieldInfo, Counter iwBytesUsed, ByteBlockPool pool) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addOneValue
(BytesRef value) void
private void
void
flush
(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) (package private) SortedSetDocValues
private SortedSetDocValues
getValues
(int[] sortedValues, int[] ordMap, BytesRefHash hash, PackedLongValues ords, PackedLongValues ordCounts, int maxCount, DocsWithFieldSet docsWithField) private void
-
Field Details
-
hash
-
pending
-
pendingCounts
-
docsWithField
-
iwBytesUsed
-
bytesUsed
private long bytesUsed -
fieldInfo
-
currentDoc
private int currentDoc -
currentValues
private int[] currentValues -
currentUpto
private int currentUpto -
maxCount
private int maxCount -
finalOrds
-
finalOrdCounts
-
finalSortedValues
private int[] finalSortedValues -
finalOrdMap
private int[] finalOrdMap
-
-
Constructor Details
-
SortedSetDocValuesWriter
SortedSetDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed, ByteBlockPool pool)
-
-
Method Details
-
addValue
-
finishCurrentDoc
private void finishCurrentDoc() -
addOneValue
-
updateBytesUsed
private void updateBytesUsed() -
getDocValues
SortedSetDocValues getDocValues()- Specified by:
getDocValues
in classDocValuesWriter<SortedSetDocValues>
-
getValues
private SortedSetDocValues getValues(int[] sortedValues, int[] ordMap, BytesRefHash hash, PackedLongValues ords, PackedLongValues ordCounts, int maxCount, DocsWithFieldSet docsWithField) -
flush
public void flush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) throws IOException - Specified by:
flush
in classDocValuesWriter<SortedSetDocValues>
- Throws:
IOException
-