[−][src]Struct tantivy::postings::FieldSerializer
The field serializer is in charge of the serialization of a specific field.
Methods
impl<'a> FieldSerializer<'a>
[src]
pub fn new_term(&mut self, term: &[u8]) -> Result<TermOrdinal>
[src]
Starts the postings for a new term.
- term - the term. It needs to come after the previous term according to the lexicographical order.
- doc_freq - return the number of document containing the term.
pub fn write_doc(
&mut self,
doc_id: DocId,
term_freq: u32,
position_deltas: &[u32]
) -> Result<()>
[src]
&mut self,
doc_id: DocId,
term_freq: u32,
position_deltas: &[u32]
) -> Result<()>
Serialize the information that a document contains the current term, its term frequency, and the position deltas.
At this point, the positions are already delta-encoded
.
For instance, if the positions are 2, 3, 17
,
position_deltas
is 2, 1, 14
Term frequencies and positions may be ignored by the serializer depending
on the configuration of the field in the Schema
.
pub fn close_term(&mut self) -> Result<()>
[src]
Finish the serialization for this term postings.
If the current block is incomplete, it need to be encoded
using VInt
encoding.
pub fn close(self) -> Result<()>
[src]
Closes the current current field.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for FieldSerializer<'a>
impl<'a> !Send for FieldSerializer<'a>
impl<'a> !Sync for FieldSerializer<'a>
impl<'a> Unpin for FieldSerializer<'a>
impl<'a> !UnwindSafe for FieldSerializer<'a>
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> Erased for T
[src]
impl<T> From<T> for T
[src]
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>,