Struct tantivy::fieldnorm::FieldNormsWriter [−][src]
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,
mut fieldnorms_serializer: FieldNormsSerializer
) -> Result<()>
[src]
&self,
mut fieldnorms_serializer: FieldNormsSerializer
) -> Result<()>
Serialize the seen fieldnorm values to the serializer for all fields.
Auto Trait Implementations
impl RefUnwindSafe for FieldNormsWriter
[src]
impl Send for FieldNormsWriter
[src]
impl Sync for FieldNormsWriter
[src]
impl Unpin for FieldNormsWriter
[src]
impl UnwindSafe for FieldNormsWriter
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub 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> 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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.
pub 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.
pub 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>,