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:
- DocValuesConsumer is created by FieldsConsumer(SegmentWriteState) or NormsConsumer(SegmentWriteState).
- AddNumericField(FieldInfo, IEnumerable<Nullable<Int64>>),
AddBinaryField(FieldInfo, IEnumerable<BytesRef>),
or AddSortedField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>) 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 (
). - After all fields are added, the consumer is Dispose()d.
Namespace: Lucene.Net.Codecs
Assembly: Lucene.Net.dll
Syntax
public abstract class DocValuesConsumer : IDisposable
Constructors
| Improve this Doc View SourceDocValuesConsumer()
Sole constructor. (For invocation by subclass constructors, typically implicit.)
Declaration
protected DocValuesConsumer()
Methods
| Improve this Doc View SourceAddBinaryField(FieldInfo, IEnumerable<BytesRef>)
Writes binary docvalues for a field.
Declaration
public abstract void AddBinaryField(FieldInfo field, IEnumerable<BytesRef> values)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | Field information. |
IEnumerable<BytesRef> | values |
|
AddNumericField(FieldInfo, IEnumerable<Nullable<Int64>>)
Writes numeric docvalues for a field.
Declaration
public abstract void AddNumericField(FieldInfo field, IEnumerable<long?> values)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | Field information. |
IEnumerable<System.Nullable<System.Int64>> | values |
|
AddSortedField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>)
Writes pre-sorted binary docvalues for a field.
Declaration
public abstract void AddSortedField(FieldInfo field, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrd)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | Field information. |
IEnumerable<BytesRef> | values | |
IEnumerable<System.Nullable<System.Int64>> | docToOrd |
|
AddSortedSetField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>, IEnumerable<Nullable<Int64>>)
Writes pre-sorted set docvalues for a field
Declaration
public abstract void AddSortedSetField(FieldInfo field, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrdCount, IEnumerable<long?> ords)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | field | Field information. |
IEnumerable<BytesRef> | values | |
IEnumerable<System.Nullable<System.Int64>> | docToOrdCount | |
IEnumerable<System.Nullable<System.Int64>> | ords |
|
Dispose()
Disposes all resources used by this object.
Declaration
public void Dispose()
Dispose(Boolean)
Implementations must override and should dispose all resources used by this instance.
Declaration
protected abstract void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
MergeBinaryField(FieldInfo, MergeState, IList<BinaryDocValues>, IList<IBits>)
Merges the binary docvalues from toMerge
.
The default implementation calls AddBinaryField(FieldInfo, IEnumerable<BytesRef>), passing
an
Declaration
public virtual void MergeBinaryField(FieldInfo fieldInfo, MergeState mergeState, IList<BinaryDocValues> toMerge, IList<IBits> docsWithField)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
MergeState | mergeState | |
IList<BinaryDocValues> | toMerge | |
IList<IBits> | docsWithField |
MergeNumericField(FieldInfo, MergeState, IList<NumericDocValues>, IList<IBits>)
Merges the numeric docvalues from toMerge
.
The default implementation calls AddNumericField(FieldInfo, IEnumerable<Nullable<Int64>>), passing
an
Declaration
public virtual void MergeNumericField(FieldInfo fieldInfo, MergeState mergeState, IList<NumericDocValues> toMerge, IList<IBits> docsWithField)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
MergeState | mergeState | |
IList<NumericDocValues> | toMerge | |
IList<IBits> | docsWithField |
MergeSortedField(FieldInfo, MergeState, IList<SortedDocValues>)
Merges the sorted docvalues from toMerge
.
The default implementation calls AddSortedField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>), passing
an
Declaration
public virtual void MergeSortedField(FieldInfo fieldInfo, MergeState mergeState, IList<SortedDocValues> toMerge)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
MergeState | mergeState | |
IList<SortedDocValues> | toMerge |
MergeSortedSetField(FieldInfo, MergeState, IList<SortedSetDocValues>)
Merges the sortedset docvalues from toMerge
.
The default implementation calls AddSortedSetField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>, IEnumerable<Nullable<Int64>>), passing
an
Declaration
public virtual void MergeSortedSetField(FieldInfo fieldInfo, MergeState mergeState, IList<SortedSetDocValues> toMerge)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldInfo | |
MergeState | mergeState | |
IList<SortedSetDocValues> | toMerge |