pub struct MmapIndexReader {
pub doc_count: u32,
pub field_length_sums: [u64; 6],
pub term_count: u32,
/* private fields */
}Expand description
Memory-mapped reader over one corpus-hash store directory (the base).
Fields§
§doc_count: u32§field_length_sums: [u64; 6]§term_count: u32Implementations§
Source§impl MmapIndexReader
impl MmapIndexReader
pub fn open( directory: &Path, corpus_hash: &str, bundle_version: &str, ) -> Result<Self, IndexFormatError>
Sourcepub fn identity_entry(&self, docid: u32) -> Result<IndexEntry, IndexFormatError>
pub fn identity_entry(&self, docid: u32) -> Result<IndexEntry, IndexFormatError>
The lightweight identity row (no sections, no inbound).
Sourcepub fn full_entry(&self, docid: u32) -> Result<IndexEntry, IndexFormatError>
pub fn full_entry(&self, docid: u32) -> Result<IndexEntry, IndexFormatError>
The full index row: identity plus searchable sections and inbound.
pub fn entry_path(&self, docid: u32) -> Result<String, IndexFormatError>
Sourcepub fn entry_status(&self, docid: u32) -> Result<String, IndexFormatError>
pub fn entry_status(&self, docid: u32) -> Result<String, IndexFormatError>
The first non-empty line of this document’s ## Status section.
Status is already present in the searchable-section segment, so
grounding can determine lifecycle without reopening and reparsing the
Markdown file.
Sourcepub fn field_lengths(&self, docid: u32) -> Result<[u64; 6], IndexFormatError>
pub fn field_lengths(&self, docid: u32) -> Result<[u64; 6], IndexFormatError>
Per-field token counts for one doc, FIELDS order.
Sourcepub fn forward_token_ids(
&self,
docid: u32,
) -> Result<[Vec<u32>; 6], IndexFormatError>
pub fn forward_token_ids( &self, docid: u32, ) -> Result<[Vec<u32>; 6], IndexFormatError>
The six forward token-id sequences of one doc, FIELDS order.
pub fn term_at(&self, term_id: u32) -> Result<String, IndexFormatError>
Sourcepub fn field_tokens(&self, docid: u32) -> Result<FieldTokens, IndexFormatError>
pub fn field_tokens(&self, docid: u32) -> Result<FieldTokens, IndexFormatError>
Reconstruct one doc’s per-field token vectors in document order.
Sourcepub fn prefix_range(&self, term: &str) -> Result<(u32, u32), IndexFormatError>
pub fn prefix_range(&self, term: &str) -> Result<(u32, u32), IndexFormatError>
The [lo, hi) term-id range of every indexed term term prefixes.
Sourcepub fn postings(&self, term_id: u32) -> Result<Vec<u32>, IndexFormatError>
pub fn postings(&self, term_id: u32) -> Result<Vec<u32>, IndexFormatError>
The ascending docids that hold term_id in any field.
Sourcepub fn prefix_docids(
&self,
term: &str,
) -> Result<BTreeSet<u32>, IndexFormatError>
pub fn prefix_docids( &self, term: &str, ) -> Result<BTreeSet<u32>, IndexFormatError>
Distinct docids matching term under the prefix predicate (ADR-037).
Sourcepub fn alias_docids(&self, wanted: &str) -> Result<Vec<u32>, IndexFormatError>
pub fn alias_docids(&self, wanted: &str) -> Result<Vec<u32>, IndexFormatError>
The ascending docids whose identity set holds wanted (already
casefolded by the caller) — binary search over the alias map.
Sourcepub fn docid_for_path(
&self,
path: &str,
) -> Result<Option<u32>, IndexFormatError>
pub fn docid_for_path( &self, path: &str, ) -> Result<Option<u32>, IndexFormatError>
The docid whose stored path equals path, or None — binary search.
pub fn relationships(&self) -> Result<Vec<Relationship>, IndexFormatError>
pub fn live_decision_paths(&self) -> Result<Vec<String>, IndexFormatError>
pub fn scope_rows(&self) -> Result<Vec<ScopeRow>, IndexFormatError>
Sourcepub fn portfolio_summary(&self) -> Result<Value, IndexFormatError>
pub fn portfolio_summary(&self) -> Result<Value, IndexFormatError>
The portfolio summary parsed back from its stored JSON text.
Auto Trait Implementations§
impl Freeze for MmapIndexReader
impl RefUnwindSafe for MmapIndexReader
impl Send for MmapIndexReader
impl Sync for MmapIndexReader
impl Unpin for MmapIndexReader
impl UnsafeUnpin for MmapIndexReader
impl UnwindSafe for MmapIndexReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more