pub struct IndexConfig {
pub dimensions: usize,
pub metric: DistanceMetric,
pub connectivity: usize,
pub expansion_build: usize,
pub expansion_query: usize,
pub replicas: usize,
pub build_threads: usize,
pub query_threads: usize,
pub seed: u64,
}Expand description
Immutable HNSW construction and query policy.
Fields§
§dimensions: usizeNumber of scalar components in every stored vector and query.
metric: DistanceMetricDistance metric used for graph construction and search.
connectivity: usizeOutgoing upper-layer link budget. Layer zero uses twice this budget; retained reverse links may increase a node’s final degree.
expansion_build: usizeCandidate width used while constructing graph links.
expansion_query: usizeCandidate width used by approximate queries.
replicas: usizeIndependently seeded deterministic HNSW graphs.
build_threads: usizeMaximum worker budget shared by replicas and bulk-construction waves.
query_threads: usizeMaximum workers used by crate::VectorIndex::search_batch.
seed: u64Fixed seed for levels and insertion order.
Implementations§
Source§impl IndexConfig
impl IndexConfig
Sourcepub fn validate(&self) -> Result<(), SearchError>
pub fn validate(&self) -> Result<(), SearchError>
Validates dimensions, graph widths, and worker bounds.
§Errors
Returns SearchError::InvalidConfig for an unusable value or
SearchError::CapacityOverflow when degree arithmetic overflows.
Trait Implementations§
Source§impl Clone for IndexConfig
impl Clone for IndexConfig
Source§fn clone(&self) -> IndexConfig
fn clone(&self) -> IndexConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more