C# Class Lucene.Net.Codecs.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:

  1. DocValuesConsumer is created by DocValuesFormat#fieldsConsumer(SegmentWriteState) or NormsFormat#normsConsumer(SegmentWriteState).
  2. #addNumericField, #addBinaryField, or #addSortedField 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()).
  3. After all fields are added, the consumer is #closed.
@lucene.experimental
Inheritance: IDisposable
Datei anzeigen Open project: paulirwin/lucene.net Class Usage Examples

Public Methods

Method Description
AddBinaryField ( FieldInfo field, IEnumerable values ) : void

Writes binary docvalues for a field.

AddNumericField ( FieldInfo field, IEnumerable values ) : void

Writes numeric docvalues for a field.

AddSortedField ( FieldInfo field, IEnumerable values, IEnumerable docToOrd ) : void

Writes pre-sorted binary docvalues for a field.

AddSortedSetField ( FieldInfo field, IEnumerable values, IEnumerable docToOrdCount, IEnumerable ords ) : void

Writes pre-sorted set docvalues for a field

Dispose ( ) : void
MergeBinaryField ( FieldInfo fieldInfo, MergeState mergeState, IList toMerge ) : void

Merges the binary docvalues from toMerge.

The default implementation calls #addBinaryField, passing an Iterable that merges and filters deleted documents on the fly.

MergeNumericField ( FieldInfo fieldInfo, MergeState mergeState, IList toMerge ) : void

Merges the numeric docvalues from toMerge.

The default implementation calls #addNumericField, passing an Iterable that merges and filters deleted documents on the fly.

MergeSortedField ( FieldInfo fieldInfo, MergeState mergeState, IList toMerge ) : void

Merges the sorted docvalues from toMerge.

The default implementation calls #addSortedField, passing an Iterable that merges ordinals and values and filters deleted documents .

MergeSortedSetField ( FieldInfo fieldInfo, MergeState mergeState, IList toMerge ) : void

Merges the sortedset docvalues from toMerge.

The default implementation calls #addSortedSetField, passing an Iterable that merges ordinals and values and filters deleted documents .

Protected Methods

Method Description
Dispose ( bool disposing ) : void
DocValuesConsumer ( ) : System.IO

Sole constructor. (For invocation by subclass constructors, typically implicit.)

Private Methods

Method Description
GetMergeBinaryFieldEnumerable ( FieldInfo fieldInfo, MergeState mergeState, IList toMerge ) : IEnumerable
GetMergeNumericFieldEnumerable ( FieldInfo fieldinfo, MergeState mergeState, IList toMerge ) : IEnumerable
GetMergeSortValuesEnumerable ( OrdinalMap map, SortedDocValues dvs ) : IEnumerable
GetMergeSortedFieldDocToOrdEnumerable ( AtomicReader readers, SortedDocValues dvs, OrdinalMap map ) : IEnumerable
GetMergeSortedSetDocToOrdCountEnumerable ( AtomicReader readers, SortedSetDocValues dvs ) : IEnumerable
GetMergeSortedSetOrdsEnumerable ( AtomicReader readers, SortedSetDocValues dvs, OrdinalMap map ) : IEnumerable
GetMergeSortedSetValuesEnumerable ( OrdinalMap map, SortedSetDocValues dvs ) : IEnumerable

Method Details

AddBinaryField() public abstract method

Writes binary docvalues for a field.
if an I/O error occurred.
public abstract AddBinaryField ( FieldInfo field, IEnumerable values ) : void
field FieldInfo field information
values IEnumerable Iterable of binary values (one for each document). {@code null} indicates /// a missing value.
return void

AddNumericField() public abstract method

Writes numeric docvalues for a field.
if an I/O error occurred.
public abstract AddNumericField ( FieldInfo field, IEnumerable values ) : void
field FieldInfo field information
values IEnumerable Iterable of numeric values (one for each document). {@code null} indicates /// a missing value.
return void

AddSortedField() public abstract method

Writes pre-sorted binary docvalues for a field.
if an I/O error occurred.
public abstract AddSortedField ( FieldInfo field, IEnumerable values, IEnumerable docToOrd ) : void
field FieldInfo field information
values IEnumerable Iterable of binary values in sorted order (deduplicated).
docToOrd IEnumerable Iterable of ordinals (one for each document). {@code -1} indicates /// a missing value.
return void

AddSortedSetField() public abstract method

Writes pre-sorted set docvalues for a field
if an I/O error occurred.
public abstract AddSortedSetField ( FieldInfo field, IEnumerable values, IEnumerable docToOrdCount, IEnumerable ords ) : void
field FieldInfo field information
values IEnumerable Iterable of binary values in sorted order (deduplicated).
docToOrdCount IEnumerable Iterable of the number of values for each document. A zero ordinal /// count indicates a missing value.
ords IEnumerable Iterable of ordinal occurrences (docToOrdCount*maxDoc total).
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected abstract method

protected abstract Dispose ( bool disposing ) : void
disposing bool
return void

DocValuesConsumer() protected method

Sole constructor. (For invocation by subclass constructors, typically implicit.)
protected DocValuesConsumer ( ) : System.IO
return System.IO

MergeBinaryField() public method

Merges the binary docvalues from toMerge.

The default implementation calls #addBinaryField, passing an Iterable that merges and filters deleted documents on the fly.

public MergeBinaryField ( FieldInfo fieldInfo, MergeState mergeState, IList toMerge ) : void
fieldInfo FieldInfo
mergeState MergeState
toMerge IList
return void

MergeNumericField() public method

Merges the numeric docvalues from toMerge.

The default implementation calls #addNumericField, passing an Iterable that merges and filters deleted documents on the fly.

public MergeNumericField ( FieldInfo fieldInfo, MergeState mergeState, IList toMerge ) : void
fieldInfo FieldInfo
mergeState MergeState
toMerge IList
return void

MergeSortedField() public method

Merges the sorted docvalues from toMerge.

The default implementation calls #addSortedField, passing an Iterable that merges ordinals and values and filters deleted documents .

public MergeSortedField ( FieldInfo fieldInfo, MergeState mergeState, IList toMerge ) : void
fieldInfo FieldInfo
mergeState MergeState
toMerge IList
return void

MergeSortedSetField() public method

Merges the sortedset docvalues from toMerge.

The default implementation calls #addSortedSetField, passing an Iterable that merges ordinals and values and filters deleted documents .

public MergeSortedSetField ( FieldInfo fieldInfo, MergeState mergeState, IList toMerge ) : void
fieldInfo FieldInfo
mergeState MergeState
toMerge IList
return void