pub struct SegmentStore { /* private fields */ }Expand description
Committed index state — immutable once created.
Shared via Arc<SegmentStore> between the Index, Searcher, Reader,
and SearchResults. The Arc ensures segments stay alive as long as
any consumer needs them.
Implementations§
Source§impl SegmentStore
impl SegmentStore
Sourcepub fn new(
segments: Vec<SegmentReader>,
analyzers: AnalyzerRegistry,
mapping: Option<Mapping>,
global_hnsw: Option<Arc<GlobalHnsw>>,
) -> Self
pub fn new( segments: Vec<SegmentReader>, analyzers: AnalyzerRegistry, mapping: Option<Mapping>, global_hnsw: Option<Arc<GlobalHnsw>>, ) -> Self
Build a SegmentStore from committed segments.
Precomputes average field lengths for BM25 scoring.
Auto Trait Implementations§
impl !RefUnwindSafe for SegmentStore
impl !UnwindSafe for SegmentStore
impl Freeze for SegmentStore
impl Send for SegmentStore
impl Sync for SegmentStore
impl Unpin for SegmentStore
impl UnsafeUnpin for SegmentStore
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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