Struct tantivy::postings::BlockSegmentPostings [−][src]
BlockSegmentPostings
is a cursor iterating over blocks
of documents.
Warning
While it is useful for some very specific high-performance
use cases, you should prefer using SegmentPostings
for most usage.
Implementations
impl BlockSegmentPostings
[src]
pub fn block_max_score(
&mut self,
fieldnorm_reader: &FieldNormReader,
bm25_weight: &BM25Weight
) -> Score
[src]
&mut self,
fieldnorm_reader: &FieldNormReader,
bm25_weight: &BM25Weight
) -> Score
Returns the block_max_score for the current block.
It does not require the block to be loaded. For instance, it is ok to call this method
after having called .shallow_advance(..)
.
See TermScorer::block_max_score(..)
for more information.
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.
This doc_freq
is simply the sum of the length of all of the blocks
length, and it does not take in account deleted documents.
pub fn docs(&self) -> &[DocId]ⓘ
[src]
Returns the array of docs in the current block.
Before the first call to .advance()
, the block
returned by .docs()
is empty.
pub fn doc(&self, idx: usize) -> u32
[src]
Return the document at index idx
of the block.
pub fn freqs(&self) -> &[u32]ⓘ
[src]
Return the array of term freq
in the block.
pub fn freq(&self, idx: usize) -> u32
[src]
Return the frequency at index idx
of the block.
pub fn block_len(&self) -> usize
[src]
Returns the length of the current block.
All blocks have a length of NUM_DOCS_PER_BLOCK
,
except the last block that may have a length
of any number between 1 and NUM_DOCS_PER_BLOCK - 1
pub fn seek(&mut self, target_doc: DocId)
[src]
Position on a block that may contains target_doc
.
If all docs are smaller than target, the block loaded may be empty, or be the last an incomplete VInt block.
pub fn advance(&mut self)
[src]
Advance to the next block.
Returns false iff there was no remaining blocks.
pub fn empty() -> BlockSegmentPostings
[src]
Returns an empty segment postings object
Trait Implementations
impl Clone for BlockSegmentPostings
[src]
fn clone(&self) -> BlockSegmentPostings
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for BlockSegmentPostings
[src]
impl Send for BlockSegmentPostings
[src]
impl Sync for BlockSegmentPostings
[src]
impl Unpin for BlockSegmentPostings
[src]
impl !UnwindSafe for BlockSegmentPostings
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
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>,