Skip to main content

MultiVectorIndex

Struct MultiVectorIndex 

Source
pub struct MultiVectorIndex { /* private fields */ }

Implementations§

Source§

impl MultiVectorIndex

Source§

impl MultiVectorIndex

Source

pub fn open_existing( path: impl AsRef<Path>, durability: Durability, ) -> Result<Self, IndexError>

Source

pub fn open( path: impl AsRef<Path>, config: IndexConfig, ) -> Result<Self, IndexError>

Source

pub fn open_with_durability( path: impl AsRef<Path>, config: IndexConfig, durability: Durability, ) -> Result<Self, IndexError>

Source

pub fn train( &self, samples: &[Vec<f32>], iterations: usize, ) -> Result<(), IndexError>

Train PLAID’s coarse k-means codebook. Must happen before ingestion.

Source

pub fn upsert( &self, id: impl Into<String>, vectors: Vec<Vec<f32>>, metadata: Value, ) -> Result<(), IndexError>

Source

pub fn upsert_batch(&self, batch: Vec<UpsertDocument>) -> Result<(), IndexError>

Atomically replace the whole batch. Duplicate IDs use the last value. Empty batches are no-ops. On a pre-publication error no document, posting, generation, or existing ANN changes; unreachable bytes may remain in the append-only segments until recovery/compaction.

Source

pub fn upsert_records( &self, batch: Vec<RetrievalDocument>, ) -> Result<(), IndexError>

Source

pub fn delete(&self, id: &str) -> Result<bool, IndexError>

Source

pub fn query( &self, vectors: &[Vec<f32>], top_k: usize, candidates: Option<usize>, ) -> Result<Vec<Hit>, IndexError>

Exact MUVERA candidates followed by compressed MaxSim rescoring.

Source

pub fn hnsw_ready(&self) -> bool

Whether the base plus mutable overlay covers the current generation.

Source

pub fn query_auto( &self, vectors: &[Vec<f32>], top_k: usize, candidates: Option<usize>, ef_search: usize, ) -> Result<Vec<Hit>, IndexError>

Use a fresh FDE-HNSW base plus exact delta when available; otherwise use exact FDE. Selection and rescoring share one generation read guard.

Source

pub fn query_auto_with_backend( &self, vectors: &[Vec<f32>], top_k: usize, candidates: Option<usize>, ef_search: usize, ) -> Result<(Vec<Hit>, &'static str), IndexError>

Return the actual backend used under the same snapshot as the results.

Source

pub fn query_with_centroid_pruning( &self, vectors: &[Vec<f32>], top_k: usize, candidates: usize, rerank_candidates: usize, ) -> Result<Vec<Hit>, IndexError>

Generate broad FDE candidates, prune with centroid-only MaxSim, then decode residuals only for the surviving documents.

Source

pub fn query_with_fde_ann_and_pruning( &self, vectors: &[Vec<f32>], top_k: usize, candidates: usize, rerank_candidates: usize, ef_search: usize, ) -> Result<Vec<Hit>, IndexError>

Same pipeline as query_with_centroid_pruning, but pulls the broad candidate set from the FDE HNSW graph instead of the exact FDE scan.

Source

pub fn exact_fde_candidates( &self, vectors: &[Vec<f32>], count: usize, ) -> Result<Vec<CandidateHit>, IndexError>

Return exact FDE candidates before compressed MaxSim reranking.

Source

pub fn build_fde_ann( &self, m: usize, ef_construct: usize, ) -> Result<usize, IndexError>

Build an HNSW index over persisted FDEs. Exact FDE scan remains available as an oracle.

Source

pub fn build_dense_ann( &self, field: &str, m: usize, ef_construct: usize, ) -> Result<usize, IndexError>

Source

pub fn query_with_fde_ann( &self, vectors: &[Vec<f32>], top_k: usize, candidates: Option<usize>, ef_search: usize, ) -> Result<Vec<Hit>, IndexError>

Source

pub fn ann_fde_candidates( &self, vectors: &[Vec<f32>], count: usize, ef_search: usize, ) -> Result<Vec<CandidateHit>, IndexError>

Return HNSW FDE candidates before compressed MaxSim reranking.

Source

pub fn query_with_probes( &self, vectors: &[Vec<f32>], top_k: usize, candidates: Option<usize>, probes: usize, ) -> Result<Vec<Hit>, IndexError>

Source

pub fn seal(&self) -> Result<(), IndexError>

Source

pub fn compact(&self) -> Result<Value, IndexError>

Copy live records into a new append segment and atomically publish its locations. Existing readers retain their old files until they finish.

Source

pub fn stats(&self) -> IndexStats

Source

pub fn score_uncompressed( &self, query: &[Vec<f32>], document: &[Vec<f32>], ) -> Result<f32, IndexError>

Diagnostic score over caller-provided vectors; used to verify scorer parity.

Source

pub fn score_compressed( &self, query: &[Vec<f32>], id: &str, ) -> Result<f32, IndexError>

Diagnostic score over the actual compressed bytes stored for a document.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V