logo
pub struct MultiValuedFastFieldWriter { /* private fields */ }
Expand description

Writer for multi-valued (as in, more than one value per document) int fast field.

This Writer is only useful for advanced users. The normal way to get your multivalued int in your index is to

  • declare your field with fast set to Cardinality::MultiValues in your schema
  • add your document simply by calling .add_document(...).

The MultiValuedFastFieldWriter can be acquired from the fastfield writer, by calling [.get_multivalue_writer_mut(...)](./struct.FastFieldsWriter.html#method. get_multivalue_writer_mut).

Once acquired, writing is done by calling .add_document_vals(&[u64]) once per document.

The serializer makes it possible to remap all of the values that were pushed to the writer using a mapping. This makes it possible to push unordered term ids, during indexing and remap them to their respective term ids when the segment is getting serialized.

Implementations

The memory used (inclusive childs)

Access the field associated to the MultiValuedFastFieldWriter

Shift to the next document and adds all of the matching field values present in the document.

Register all of the values associated to a document.

The method returns the DocId of the document that was just written.

Serializes fast field values by pushing them to the FastFieldSerializer.

If a mapping is given, the values are remapped and sorted before serialization. This is used when serializing facets. Specifically their terms are first stored in the writer as their position in the IndexWriter’s HashMap. This value is called an UnorderedTermId.

During the serialization of the segment, terms gets sorted and tantivy builds a mapping to convert this UnorderedTermId into term ordinals.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.