[−][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
Implementations
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: FieldNormsSerializer
) -> Result<()>
[src]
&self,
fieldnorms_serializer: FieldNormsSerializer
) -> Result<()>
Serialize the seen fieldnorm values to the serializer for all fields.
Auto Trait Implementations
impl RefUnwindSafe for FieldNormsWriter
impl Send for FieldNormsWriter
impl Sync for FieldNormsWriter
impl Unpin for FieldNormsWriter
impl UnwindSafe for FieldNormsWriter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
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, 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,