pub struct VectorIndexConfig {Show 25 fields
pub dim: u32,
pub metric: i32,
pub m: u32,
pub m_max0: u32,
pub ef_construction: u32,
pub ef_search: u32,
pub index_type: i32,
pub nlist: u32,
pub nprobe: u32,
pub pq_num_sub: u32,
pub pq_num_centroids: u32,
pub pq_max_iter: u32,
pub ivf_max_iter: u32,
pub split_threshold: u32,
pub merge_threshold: u32,
pub compact_delete_ratio: f32,
pub nlist_coarse: u32,
pub nprobe_coarse: u32,
pub diskann_degree: u32,
pub diskann_search_list: u32,
pub diskann_alpha: f32,
pub indexed_fields: Vec<PayloadFieldIndex>,
pub multivector_candidates_per_token: u32,
pub tenant_key: String,
pub tenant_promote_threshold: u32,
}Expand description
Configuration for a vector index.
Fields§
§dim: u32Vector dimensionality
metric: i32Distance metric
m: u32Max connections per layer (default 16)
m_max0: u32Max connections at layer 0 (default 2*m)
ef_construction: u32Build-time search width (default 200)
ef_search: u32Default query-time search width (default 64)
index_type: i32Index type (default: plain HNSW)
nlist: u32── IVF / SPFresh fields ────────────────────────────────────────────────────
Number of Voronoi cells (coarse clusters)
nprobe: u32Cells to probe at query time
pq_num_sub: u32PQ: number of sub-quantizers
pq_num_centroids: u32PQ: centroids per sub-quantizer (default 256)
pq_max_iter: u32PQ: k-means iterations (default 20)
ivf_max_iter: u32IVF: coarse k-means iterations (default 20)
split_threshold: u32SPFresh: posting list split threshold (0 = auto)
merge_threshold: u32SPFresh: posting list merge threshold (0 = auto)
compact_delete_ratio: f32SPFresh: compaction trigger ratio (default 0.3)
nlist_coarse: u32── Coarse centroid routing fields ──────────────────────────────────────────
Number of coarse centroids for distributed routing (0 = disable)
nprobe_coarse: u32Coarse centroids to probe at search time (default: 1)
diskann_degree: u32── DiskANN / Vamana fields ──────────────────────────────────────────────────
DiskANN: max graph out-degree R (default 64)
diskann_search_list: u32DiskANN: build/search candidate list L (default 100)
diskann_alpha: f32DiskANN: RobustPrune alpha relaxation (default 1.2)
indexed_fields: Vec<PayloadFieldIndex>── Payload secondary indexes (roaring-bitmap / field index) ────────────────── Fields whose payload values get a secondary index for fast pre-filtering. Omitted/empty => no payload index (behavior identical to today’s O(n) probe).
multivector_candidates_per_token: u32── Multi-vector / late-interaction fields ─────────────────────────────────
Per query token ANN candidates (0 = default 32)
tenant_key: String── Tenant-partitioned vector index (multitenancy) ────────────────────────── Designate a payload field as the tenant key. When non-empty, the index becomes a tenant router: tenant-equality filtered searches are scoped to that tenant’s sub-structure. Empty => None => behavior identical to today. Graph-backed index types only (HNSW/PQ_HNSW/SQ_HNSW); a tenant_key on any other type is rejected.
tenant_promote_threshold: u32Promote-to-dedicated-subgraph size (0 = engine default; Phase 2)
Implementations§
Source§impl VectorIndexConfig
impl VectorIndexConfig
Sourcepub fn metric(&self) -> VectorDistanceMetric
pub fn metric(&self) -> VectorDistanceMetric
Returns the enum value of metric, or the default if the field is set to an invalid enum value.
Sourcepub fn set_metric(&mut self, value: VectorDistanceMetric)
pub fn set_metric(&mut self, value: VectorDistanceMetric)
Sets metric to the provided enum value.
Sourcepub fn index_type(&self) -> VectorIndexType
pub fn index_type(&self) -> VectorIndexType
Returns the enum value of index_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_index_type(&mut self, value: VectorIndexType)
pub fn set_index_type(&mut self, value: VectorIndexType)
Sets index_type to the provided enum value.
Trait Implementations§
Source§impl Clone for VectorIndexConfig
impl Clone for VectorIndexConfig
Source§fn clone(&self) -> VectorIndexConfig
fn clone(&self) -> VectorIndexConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VectorIndexConfig
impl Debug for VectorIndexConfig
Source§impl Default for VectorIndexConfig
impl Default for VectorIndexConfig
Source§impl Message for VectorIndexConfig
impl Message for VectorIndexConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for VectorIndexConfig
impl PartialEq for VectorIndexConfig
impl StructuralPartialEq for VectorIndexConfig
Auto Trait Implementations§
impl Freeze for VectorIndexConfig
impl RefUnwindSafe for VectorIndexConfig
impl Send for VectorIndexConfig
impl Sync for VectorIndexConfig
impl Unpin for VectorIndexConfig
impl UnsafeUnpin for VectorIndexConfig
impl UnwindSafe for VectorIndexConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request