public class Lucene45DocValuesConsumer extends DocValuesConsumer implements Closeable
Lucene45DocValuesFormat
Modifier and Type | Field and Description |
---|---|
static int |
BINARY_FIXED_UNCOMPRESSED
Uncompressed binary, written directly (fixed length).
|
static int |
BINARY_PREFIX_COMPRESSED
Compressed binary with shared prefixes
|
static int |
BINARY_VARIABLE_UNCOMPRESSED
Uncompressed binary, written directly (variable length).
|
static int |
DELTA_COMPRESSED
Compressed using packed blocks of ints.
|
static int |
GCD_COMPRESSED
Compressed by computing the GCD.
|
static int |
SORTED_SET_SINGLE_VALUED_SORTED
Single-valued sorted set values, encoded as sorted values, so no level
of indirection: docId -> ord.
|
static int |
SORTED_SET_WITH_ADDRESSES
Standard storage for sorted set values with 1 level of indirection:
docId -> address -> ord.
|
static int |
TABLE_COMPRESSED
Compressed by giving IDs to unique values.
|
Constructor and Description |
---|
Lucene45DocValuesConsumer(SegmentWriteState state,
String dataCodec,
String dataExtension,
String metaCodec,
String metaExtension)
expert: Creates a new writer
|
Modifier and Type | Method and Description |
---|---|
void |
addBinaryField(FieldInfo field,
Iterable<BytesRef> values)
Writes binary docvalues for a field.
|
void |
addNumericField(FieldInfo field,
Iterable<Number> values)
Writes numeric docvalues for a field.
|
void |
addSortedField(FieldInfo field,
Iterable<BytesRef> values,
Iterable<Number> docToOrd)
Writes pre-sorted binary docvalues for a field.
|
void |
addSortedSetField(FieldInfo field,
Iterable<BytesRef> values,
Iterable<Number> docToOrdCount,
Iterable<Number> ords)
Writes pre-sorted set docvalues for a field
|
protected void |
addTermsDict(FieldInfo field,
Iterable<BytesRef> values)
expert: writes a value dictionary for a sorted/sortedset field
|
void |
close() |
mergeBinaryField, mergeNumericField, mergeSortedField, mergeSortedSetField
public static final int DELTA_COMPRESSED
public static final int GCD_COMPRESSED
public static final int TABLE_COMPRESSED
public static final int BINARY_FIXED_UNCOMPRESSED
public static final int BINARY_VARIABLE_UNCOMPRESSED
public static final int BINARY_PREFIX_COMPRESSED
public static final int SORTED_SET_WITH_ADDRESSES
public static final int SORTED_SET_SINGLE_VALUED_SORTED
public Lucene45DocValuesConsumer(SegmentWriteState state, String dataCodec, String dataExtension, String metaCodec, String metaExtension) throws IOException
IOException
public void addNumericField(FieldInfo field, Iterable<Number> values) throws IOException
DocValuesConsumer
addNumericField
in class DocValuesConsumer
field
- field informationvalues
- Iterable of numeric values (one for each document). null
indicates
a missing value.IOException
- if an I/O error occurred.public void addBinaryField(FieldInfo field, Iterable<BytesRef> values) throws IOException
DocValuesConsumer
addBinaryField
in class DocValuesConsumer
field
- field informationvalues
- Iterable of binary values (one for each document). null
indicates
a missing value.IOException
- if an I/O error occurred.protected void addTermsDict(FieldInfo field, Iterable<BytesRef> values) throws IOException
IOException
public void addSortedField(FieldInfo field, Iterable<BytesRef> values, Iterable<Number> docToOrd) throws IOException
DocValuesConsumer
addSortedField
in class DocValuesConsumer
field
- field informationvalues
- Iterable of binary values in sorted order (deduplicated).docToOrd
- Iterable of ordinals (one for each document). -1
indicates
a missing value.IOException
- if an I/O error occurred.public void addSortedSetField(FieldInfo field, Iterable<BytesRef> values, Iterable<Number> docToOrdCount, Iterable<Number> ords) throws IOException
DocValuesConsumer
addSortedSetField
in class DocValuesConsumer
field
- field informationvalues
- Iterable of binary values in sorted order (deduplicated).docToOrdCount
- Iterable of the number of values for each document. A zero ordinal
count indicates a missing value.ords
- Iterable of ordinal occurrences (docToOrdCount*maxDoc total).IOException
- if an I/O error occurred.public void close() throws IOException
close
in interface Closeable
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.