Package org.apache.lucene.index
Class SortedSetDocValuesWriter
- java.lang.Object
-
- org.apache.lucene.index.DocValuesWriter<SortedSetDocValues>
-
- org.apache.lucene.index.SortedSetDocValuesWriter
-
class SortedSetDocValuesWriter extends DocValuesWriter<SortedSetDocValues>
Buffers up pending byte[]s per doc, deref and sorting via int ord, then flushes when segment flushes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSortedSetDocValuesWriter.BufferedSortedSetDocValues(package private) static classSortedSetDocValuesWriter.DocOrds(package private) static classSortedSetDocValuesWriter.SortingSortedSetDocValues
-
Field Summary
Fields Modifier and Type Field Description private longbytesUsedprivate intcurrentDocprivate intcurrentUptoprivate int[]currentValuesprivate DocsWithFieldSetdocsWithFieldprivate FieldInfofieldInfoprivate PackedLongValuesfinalOrdCountsprivate int[]finalOrdMapprivate PackedLongValuesfinalOrdsprivate int[]finalSortedValues(package private) BytesRefHashhashprivate CounteriwBytesUsedprivate intmaxCountprivate PackedLongValues.Builderpendingprivate PackedLongValues.BuilderpendingCounts
-
Constructor Summary
Constructors Constructor Description SortedSetDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddOneValue(BytesRef value)voidaddValue(int docID, BytesRef value)private voidfinishCurrentDoc()voidflush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer)(package private) SortedSetDocValuesgetDocValues()private voidupdateBytesUsed()
-
-
-
Field Detail
-
hash
final BytesRefHash hash
-
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 int[] currentValues
-
currentUpto
private int currentUpto
-
maxCount
private int maxCount
-
finalOrds
private PackedLongValues finalOrds
-
finalOrdCounts
private PackedLongValues finalOrdCounts
-
finalSortedValues
private int[] finalSortedValues
-
finalOrdMap
private int[] finalOrdMap
-
-
Method Detail
-
addValue
public void addValue(int docID, BytesRef value)
-
finishCurrentDoc
private void finishCurrentDoc()
-
addOneValue
private void addOneValue(BytesRef value)
-
updateBytesUsed
private void updateBytesUsed()
-
getDocValues
SortedSetDocValues getDocValues()
- Specified by:
getDocValuesin classDocValuesWriter<SortedSetDocValues>
-
flush
public void flush(SegmentWriteState state, Sorter.DocMap sortMap, DocValuesConsumer dvConsumer) throws java.io.IOException
- Specified by:
flushin classDocValuesWriter<SortedSetDocValues>- Throws:
java.io.IOException
-
-