pub struct ShardedSparseConfig {
pub version: u32,
pub shards: usize,
pub balance_weight: f64,
pub df_threshold: u32,
}Expand description
Persisted as _sparse_config.json at the root of the storage.
Versioned and tolerant on purpose: it used to carry
deny_unknown_fields and no version, so the day a field was added, the
previous release could no longer read the file — the compatibility was
structurally broken for this one file, while the shard router next to it
does it right (magic SHRD, version, a range of readable versions).
A field this build does not know is now ignored, and version says what
wrote the file.
Fields§
§version: u32Format of this file. Absent means the versionless original (0).
shards: usizeNumber of shards, at least 1.
balance_weight: f64Routing balance, 0.0..=1.0: 1.0 is round-robin (the default), lower values co-locate vectors sharing dimensions on the same shard.
df_threshold: u32Dimensions with a global document frequency above this are not tracked for routing (they carry no locality information).
Implementations§
Trait Implementations§
Source§impl Clone for ShardedSparseConfig
impl Clone for ShardedSparseConfig
Source§fn clone(&self) -> ShardedSparseConfig
fn clone(&self) -> ShardedSparseConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more