Module org.apache.lucene.codecs
Class SimpleTextDocValuesWriter
- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesConsumer
-
- org.apache.lucene.codecs.simpletext.SimpleTextDocValuesWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class SimpleTextDocValuesWriter extends DocValuesConsumer
-
-
Field Summary
Fields Modifier and Type Field Description (package private) IndexOutput
data
(package private) static BytesRef
END
(package private) static BytesRef
FIELD
private java.util.Set<java.lang.String>
fieldsSeen
(package private) static BytesRef
LENGTH
(package private) static BytesRef
MAXLENGTH
(package private) static BytesRef
MINVALUE
(package private) int
numDocs
(package private) static BytesRef
NUMVALUES
(package private) static BytesRef
ORDPATTERN
(package private) static BytesRef
PATTERN
(package private) BytesRefBuilder
scratch
(package private) static BytesRef
TYPE
-
Constructor Summary
Constructors Constructor Description SimpleTextDocValuesWriter(SegmentWriteState state, java.lang.String ext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBinaryField(FieldInfo field, DocValuesProducer valuesProducer)
Writes binary docvalues for a field.void
addNumericField(FieldInfo field, DocValuesProducer valuesProducer)
Writes numeric docvalues for a field.void
addSortedField(FieldInfo field, DocValuesProducer valuesProducer)
Writes pre-sorted binary docvalues for a field.void
addSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer)
Writes pre-sorted numeric docvalues for a fieldvoid
addSortedSetField(FieldInfo field, DocValuesProducer valuesProducer)
Writes pre-sorted set docvalues for a fieldvoid
close()
private void
doAddBinaryField(FieldInfo field, DocValuesProducer valuesProducer)
private boolean
fieldSeen(java.lang.String field)
private void
writeFieldEntry(FieldInfo field, DocValuesType type)
write the header for this field-
Methods inherited from class org.apache.lucene.codecs.DocValuesConsumer
isSingleValued, merge, mergeBinaryField, mergeNumericField, mergeSortedField, mergeSortedNumericField, mergeSortedSetField, singletonView
-
-
-
-
Field Detail
-
END
static final BytesRef END
-
FIELD
static final BytesRef FIELD
-
TYPE
static final BytesRef TYPE
-
MINVALUE
static final BytesRef MINVALUE
-
PATTERN
static final BytesRef PATTERN
-
LENGTH
static final BytesRef LENGTH
-
MAXLENGTH
static final BytesRef MAXLENGTH
-
NUMVALUES
static final BytesRef NUMVALUES
-
ORDPATTERN
static final BytesRef ORDPATTERN
-
data
IndexOutput data
-
scratch
final BytesRefBuilder scratch
-
numDocs
final int numDocs
-
fieldsSeen
private final java.util.Set<java.lang.String> fieldsSeen
-
-
Constructor Detail
-
SimpleTextDocValuesWriter
public SimpleTextDocValuesWriter(SegmentWriteState state, java.lang.String ext) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
fieldSeen
private boolean fieldSeen(java.lang.String field)
-
addNumericField
public void addNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes numeric docvalues for a field.- Specified by:
addNumericField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- Numeric values to write.- Throws:
java.io.IOException
- if an I/O error occurred.
-
addBinaryField
public void addBinaryField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes binary docvalues for a field.- Specified by:
addBinaryField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- Binary values to write.- Throws:
java.io.IOException
- if an I/O error occurred.
-
doAddBinaryField
private void doAddBinaryField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
- Throws:
java.io.IOException
-
addSortedField
public void addSortedField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes pre-sorted binary docvalues for a field.- Specified by:
addSortedField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- produces the values and ordinals to write- Throws:
java.io.IOException
- if an I/O error occurred.
-
addSortedNumericField
public void addSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes pre-sorted numeric docvalues for a field- Specified by:
addSortedNumericField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- produces the values to write- Throws:
java.io.IOException
- if an I/O error occurred.
-
addSortedSetField
public void addSortedSetField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes pre-sorted set docvalues for a field- Specified by:
addSortedSetField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- produces the values to write- Throws:
java.io.IOException
- if an I/O error occurred.
-
writeFieldEntry
private void writeFieldEntry(FieldInfo field, DocValuesType type) throws java.io.IOException
write the header for this field- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
-