|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.codecs.DocValuesConsumer
public abstract class DocValuesConsumer
Abstract API that consumes numeric, binary and sorted docvalues. Concrete implementations of this actually do "something" with the docvalues (write it into the index in a specific format).
The lifecycle is:
DocValuesFormat.fieldsConsumer(SegmentWriteState)
or
NormsFormat.normsConsumer(SegmentWriteState)
.
addNumericField(org.apache.lucene.index.FieldInfo, java.lang.Iterable)
, addBinaryField(org.apache.lucene.index.FieldInfo, java.lang.Iterable)
,
or addSortedField(org.apache.lucene.index.FieldInfo, java.lang.Iterable, java.lang.Iterable)
are called for each Numeric,
Binary, or Sorted docvalues field. The API is a "pull" rather
than "push", and the implementation is free to iterate over the
values multiple times (Iterable.iterator()
).
Closeable.close()
d.
Constructor Summary | |
---|---|
protected |
DocValuesConsumer()
Sole constructor. |
Method Summary | |
---|---|
abstract void |
addBinaryField(FieldInfo field,
Iterable<BytesRef> values)
Writes binary docvalues for a field. |
abstract void |
addNumericField(FieldInfo field,
Iterable<Number> values)
Writes numeric docvalues for a field. |
abstract void |
addSortedField(FieldInfo field,
Iterable<BytesRef> values,
Iterable<Number> docToOrd)
Writes pre-sorted binary docvalues for a field. |
abstract void |
addSortedSetField(FieldInfo field,
Iterable<BytesRef> values,
Iterable<Number> docToOrdCount,
Iterable<Number> ords)
Writes pre-sorted set docvalues for a field |
void |
mergeBinaryField(FieldInfo fieldInfo,
MergeState mergeState,
List<BinaryDocValues> toMerge)
Merges the binary docvalues from toMerge . |
void |
mergeNumericField(FieldInfo fieldInfo,
MergeState mergeState,
List<NumericDocValues> toMerge)
Merges the numeric docvalues from toMerge . |
void |
mergeSortedField(FieldInfo fieldInfo,
MergeState mergeState,
List<SortedDocValues> toMerge)
Merges the sorted docvalues from toMerge . |
void |
mergeSortedSetField(FieldInfo fieldInfo,
MergeState mergeState,
List<SortedSetDocValues> toMerge)
Merges the sortedset docvalues from toMerge . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.io.Closeable |
---|
close |
Constructor Detail |
---|
protected DocValuesConsumer()
Method Detail |
---|
public abstract void addNumericField(FieldInfo field, Iterable<Number> values) throws IOException
field
- field informationvalues
- Iterable of numeric values (one for each document).
IOException
- if an I/O error occurred.public abstract void addBinaryField(FieldInfo field, Iterable<BytesRef> values) throws IOException
field
- field informationvalues
- Iterable of binary values (one for each document).
IOException
- if an I/O error occurred.public abstract void addSortedField(FieldInfo field, Iterable<BytesRef> values, Iterable<Number> docToOrd) throws IOException
field
- field informationvalues
- Iterable of binary values in sorted order (deduplicated).docToOrd
- Iterable of ordinals (one for each document).
IOException
- if an I/O error occurred.public abstract void addSortedSetField(FieldInfo field, Iterable<BytesRef> values, Iterable<Number> docToOrdCount, Iterable<Number> ords) throws IOException
field
- field informationvalues
- Iterable of binary values in sorted order (deduplicated).docToOrdCount
- Iterable of the number of values for each document.ords
- Iterable of ordinal occurrences (docToOrdCount*maxDoc total).
IOException
- if an I/O error occurred.public void mergeNumericField(FieldInfo fieldInfo, MergeState mergeState, List<NumericDocValues> toMerge) throws IOException
toMerge
.
The default implementation calls addNumericField(org.apache.lucene.index.FieldInfo, java.lang.Iterable
, passing
an Iterable that merges and filters deleted documents on the fly.
IOException
public void mergeBinaryField(FieldInfo fieldInfo, MergeState mergeState, List<BinaryDocValues> toMerge) throws IOException
toMerge
.
The default implementation calls addBinaryField(org.apache.lucene.index.FieldInfo, java.lang.Iterable
, passing
an Iterable that merges and filters deleted documents on the fly.
IOException
public void mergeSortedField(FieldInfo fieldInfo, MergeState mergeState, List<SortedDocValues> toMerge) throws IOException
toMerge
.
The default implementation calls addSortedField(org.apache.lucene.index.FieldInfo, java.lang.Iterable
, passing
an Iterable that merges ordinals and values and filters deleted documents .
IOException
public void mergeSortedSetField(FieldInfo fieldInfo, MergeState mergeState, List<SortedSetDocValues> toMerge) throws IOException
toMerge
.
The default implementation calls addSortedSetField(org.apache.lucene.index.FieldInfo, java.lang.Iterable
, passing
an Iterable that merges ordinals and values and filters deleted documents .
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |