Struct tantivy::fastfield::FastFieldsWriter
source · [−]pub struct FastFieldsWriter { /* private fields */ }
Expand description
The FastFieldsWriter
groups all of the fast field writers.
Implementations
sourceimpl FastFieldsWriter
impl FastFieldsWriter
sourcepub fn from_schema(schema: &Schema) -> FastFieldsWriter
pub fn from_schema(schema: &Schema) -> FastFieldsWriter
Create all FastFieldWriter
required by the schema.
sourcepub fn get_term_id_writer(
&self,
field: Field
) -> Option<&MultiValuedFastFieldWriter>
pub fn get_term_id_writer(
&self,
field: Field
) -> Option<&MultiValuedFastFieldWriter>
Get the FastFieldWriter
associated to a field.
sourcepub fn get_field_writer(&self, field: Field) -> Option<&IntFastFieldWriter>
pub fn get_field_writer(&self, field: Field) -> Option<&IntFastFieldWriter>
Get the FastFieldWriter
associated to a field.
sourcepub fn get_field_writer_mut(
&mut self,
field: Field
) -> Option<&mut IntFastFieldWriter>
pub fn get_field_writer_mut(
&mut self,
field: Field
) -> Option<&mut IntFastFieldWriter>
Get the FastFieldWriter
associated to a field.
sourcepub fn get_term_id_writer_mut(
&mut self,
field: Field
) -> Option<&mut MultiValuedFastFieldWriter>
pub fn get_term_id_writer_mut(
&mut self,
field: Field
) -> Option<&mut MultiValuedFastFieldWriter>
Get the FastFieldWriter
associated to a field.
sourcepub fn get_multivalue_writer_mut(
&mut self,
field: Field
) -> Option<&mut MultiValuedFastFieldWriter>
pub fn get_multivalue_writer_mut(
&mut self,
field: Field
) -> Option<&mut MultiValuedFastFieldWriter>
Returns the fast field multi-value writer for the given field.
Returns None if the field does not exist, or is not configured as a multivalued fastfield in the schema.
sourcepub fn get_bytes_writer_mut(
&mut self,
field: Field
) -> Option<&mut BytesFastFieldWriter>
pub fn get_bytes_writer_mut(
&mut self,
field: Field
) -> Option<&mut BytesFastFieldWriter>
Returns the bytes fast field writer for the given field.
Returns None if the field does not exist, or is not configured as a bytes fastfield in the schema.
sourcepub fn add_document(&mut self, doc: &Document)
pub fn add_document(&mut self, doc: &Document)
Indexes all of the fastfields of a new document.
sourcepub fn serialize(
&self,
serializer: &mut CompositeFastFieldSerializer,
mapping: &HashMap<Field, FnvHashMap<u64, TermOrdinal>>,
doc_id_map: Option<&DocIdMapping>
) -> Result<()>
pub fn serialize(
&self,
serializer: &mut CompositeFastFieldSerializer,
mapping: &HashMap<Field, FnvHashMap<u64, TermOrdinal>>,
doc_id_map: Option<&DocIdMapping>
) -> Result<()>
Serializes all of the FastFieldWriter
s by pushing them in
order to the fast field serializer.
Auto Trait Implementations
impl RefUnwindSafe for FastFieldsWriter
impl Send for FastFieldsWriter
impl Sync for FastFieldsWriter
impl Unpin for FastFieldsWriter
impl UnwindSafe for FastFieldsWriter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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