pub struct IndexConfig {
pub n_partitions: usize,
pub pq_subspaces: usize,
pub n_probe: usize,
pub n_rerank: usize,
pub kmeans_iters: usize,
pub seed: u64,
}Expand description
Tuning knobs for building and querying an [IvfPqIndex].
Fields§
§n_partitions: usizeNumber of IVF partitions. 0 means auto (ceil(√n)).
pq_subspaces: usizeNumber of PQ subspaces. 0 means auto (dims / 4). Previously
dims / 8 before PR ANN-1 — see IndexConfig::default for
why the bump.
n_probe: usizePartitions scanned per query (the IVF accuracy/speed dial).
0 means auto (ceil(partitions / 2)). Previously a fixed 8
before PR ANN-1.
n_rerank: usizeCandidates handed back for exact reranking (the PQ accuracy dial).
0 means auto (500). Previously a fixed 64 before PR ANN-1.
kmeans_iters: usizeLloyd-iteration count for every k-means run.
seed: u64RNG seed for reproducible builds.
Trait Implementations§
Auto Trait Implementations§
impl Forget for IndexConfig
impl Freeze for IndexConfig
impl RefUnwindSafe for IndexConfig
impl Send for IndexConfig
impl Sync for IndexConfig
impl Unpin for IndexConfig
impl UnsafeUnpin for IndexConfig
impl UnwindSafe for IndexConfig
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