[−][src]Struct tantivy::postings::SegmentPostings
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.
Methods
impl SegmentPostings
[src]
pub fn empty() -> Self
[src]
Returns an empty segment postings object
pub fn create_from_docs(docs: &[u32]) -> SegmentPostings
[src]
Creates a segment postings object with the given documents and no frequency encoded.
This method is mostly useful for unit tests.
It serializes the doc ids using tantivy's codec
and returns a SegmentPostings
object that embeds a
buffer with the serialized data.
Trait Implementations
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.
fn positions_with_offset(&mut self, offset: u32, output: &mut Vec<u32>)
[src]
fn positions(&mut self, output: &mut Vec<u32>)
[src]
impl DocSet for SegmentPostings
[src]
fn advance(&mut self) -> bool
[src]
fn skip_next(&mut self, target: DocId) -> SkipResult
[src]
fn doc(&self) -> DocId
[src]
Return the current document's DocId
.
Panics
Will panics if called without having called advance before.
fn size_hint(&self) -> u32
[src]
fn append_to_bitset(&mut self, bitset: &mut BitSet)
[src]
fn fill_buffer(&mut self, buffer: &mut [DocId]) -> usize
[src]
fn count(&mut self, delete_bitset: &DeleteBitSet) -> u32
[src]
fn count_including_deleted(&mut self) -> u32
[src]
Auto Trait Implementations
impl !Send for SegmentPostings
impl !Sync for SegmentPostings
impl Unpin for SegmentPostings
impl !UnwindSafe for SegmentPostings
impl !RefUnwindSafe for SegmentPostings
Blanket Implementations
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> 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> 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,