[−][src]Struct tantivy::fieldnorm::FieldNormsWriter
The FieldNormsWriter
is in charge of tracking the fieldnorm byte
of each document for each field with field norms.
FieldNormsWriter
stores a Vec
Methods
impl FieldNormsWriter
[src]
pub fn for_schema(schema: &Schema) -> FieldNormsWriter
[src]
Initialize with state for tracking the field norm fields specified in the schema.
pub fn fill_up_to_max_doc(&mut self, max_doc: DocId)
[src]
Ensure that all documents in 0..max_doc have a byte associated with them in each of the fieldnorm vectors.
Will extend with 0-bytes for documents that have not been seen.
pub fn record(&mut self, doc: DocId, field: Field, fieldnorm: u32)
[src]
Set the fieldnorm byte for the given document for the given field.
Will internally convert the u32 fieldnorm
value to the appropriate byte
to approximate the field norm in less space.
- doc - the document id
- field - the field being set
- fieldnorm - the number of terms present in document
doc
in fieldfield
pub fn serialize(
&self,
fieldnorms_serializer: &mut FieldNormsSerializer
) -> Result<()>
[src]
&self,
fieldnorms_serializer: &mut FieldNormsSerializer
) -> Result<()>
Serialize the seen fieldnorm values to the serializer for all fields.
Auto Trait Implementations
impl Send for FieldNormsWriter
impl Unpin for FieldNormsWriter
impl Sync for FieldNormsWriter
impl UnwindSafe for FieldNormsWriter
impl RefUnwindSafe for FieldNormsWriter
Blanket Implementations
impl<T> Fruit for T where
T: Send + Downcast,
[src]
T: Send + Downcast,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,