Skip to main content

VectorIndexConfig

Struct VectorIndexConfig 

Source
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: u32

Vector dimensionality

§metric: i32

Distance metric

§m: u32

Max connections per layer (default 16)

§m_max0: u32

Max connections at layer 0 (default 2*m)

§ef_construction: u32

Build-time search width (default 200)

§ef_search: u32

Default query-time search width (default 64)

§index_type: i32

Index type (default: plain HNSW)

§nlist: u32

── IVF / SPFresh fields ────────────────────────────────────────────────────

Number of Voronoi cells (coarse clusters)

§nprobe: u32

Cells to probe at query time

§pq_num_sub: u32

PQ: number of sub-quantizers

§pq_num_centroids: u32

PQ: centroids per sub-quantizer (default 256)

§pq_max_iter: u32

PQ: k-means iterations (default 20)

§ivf_max_iter: u32

IVF: coarse k-means iterations (default 20)

§split_threshold: u32

SPFresh: posting list split threshold (0 = auto)

§merge_threshold: u32

SPFresh: posting list merge threshold (0 = auto)

§compact_delete_ratio: f32

SPFresh: compaction trigger ratio (default 0.3)

§nlist_coarse: u32

── Coarse centroid routing fields ──────────────────────────────────────────

Number of coarse centroids for distributed routing (0 = disable)

§nprobe_coarse: u32

Coarse 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: u32

DiskANN: build/search candidate list L (default 100)

§diskann_alpha: f32

DiskANN: 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: u32

Promote-to-dedicated-subgraph size (0 = engine default; Phase 2)

Implementations§

Source§

impl VectorIndexConfig

Source

pub fn metric(&self) -> VectorDistanceMetric

Returns the enum value of metric, or the default if the field is set to an invalid enum value.

Source

pub fn set_metric(&mut self, value: VectorDistanceMetric)

Sets metric to the provided enum value.

Source

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.

Source

pub fn set_index_type(&mut self, value: VectorIndexType)

Sets index_type to the provided enum value.

Trait Implementations§

Source§

impl Clone for VectorIndexConfig

Source§

fn clone(&self) -> VectorIndexConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VectorIndexConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VectorIndexConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for VectorIndexConfig

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for VectorIndexConfig

Source§

fn eq(&self, other: &VectorIndexConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for VectorIndexConfig

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more