Struct tantivy::postings::SegmentPostings[][src]

pub struct SegmentPostings { /* fields omitted */ }

SegmentPostings represents the inverted list or postings associated to a term in a Segment.

As we iterate through the SegmentPostings, the frequencies are optionally decoded. Positions on the other hand, are optionally entirely decoded upfront.

Implementations

impl SegmentPostings[src]

pub fn empty() -> Self[src]

Returns an empty segment postings object

pub fn doc_freq_given_deletes(&self, delete_bitset: &DeleteBitSet) -> u32[src]

Compute the number of non-deleted documents.

This method will clone and scan through the posting lists. (this is a rather expensive operation).

pub fn doc_freq(&self) -> u32[src]

Returns the overall number of documents in the block postings. It does not take in account whether documents are deleted or not.

Trait Implementations

impl Clone for SegmentPostings[src]

impl DocSet for SegmentPostings[src]

fn doc(&self) -> DocId[src]

Return the current document's DocId.

impl HasLen for SegmentPostings[src]

impl Postings for SegmentPostings[src]

fn term_freq(&self) -> u32[src]

Returns the frequency associated to the current document. If the schema is set up so that no frequency have been encoded, this method should always return 1.

Panics

Will panics if called without having called advance before.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T> Fruit for T where
    T: Send + Downcast
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,