Struct tantivy::fastfield::BytesFastFieldWriter[][src]

pub struct BytesFastFieldWriter { /* fields omitted */ }

Writer for byte array (as in, any number of bytes per document) fast fields

This BytesFastFieldWriter is only useful for advanced user. The normal way to get your associated bytes in your index is to

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

The BytesFastFieldWriter can be acquired from the fast field writer by calling .get_bytes_writer(...).

Once acquired, writing is done by calling .add_document_val(&[u8]) once per document, even if there are no bytes associated to it.

Implementations

impl BytesFastFieldWriter[src]

pub fn new(field: Field) -> Self[src]

Creates a new BytesFastFieldWriter

pub fn field(&self) -> Field[src]

Access the field associated to the BytesFastFieldWriter

pub fn add_document(&mut self, doc: &Document)[src]

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

pub fn add_document_val(&mut self, val: &[u8]) -> DocId[src]

Register the bytes associated to a document.

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

pub fn serialize(&self, serializer: &mut FastFieldSerializer) -> Result<()>[src]

Serializes the fast field values by pushing them to the FastFieldSerializer.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T> Fruit for T where
    T: Send + Downcast
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,