pub struct VectorIndexConfigBuilder {
pub distance: Option<DistanceMetric>,
pub ef: Option<i64>,
pub ef_construction: Option<u64>,
pub max_connections: Option<u64>,
pub dynamic_ef_min: Option<i64>,
pub dynamic_ef_max: Option<i64>,
pub dynamic_ef_factor: Option<i64>,
pub vector_cache_max_objects: Option<u64>,
pub flat_search_cut_off: Option<u64>,
pub cleanup_interval_seconds: Option<u64>,
pub pq: Option<PqConfig>,
pub skip: Option<bool>,
}Expand description
VectorIndexConfigBuilder for building a new VectorIndexConfig
Fields§
§distance: Option<DistanceMetric>§ef: Option<i64>§ef_construction: Option<u64>§max_connections: Option<u64>§dynamic_ef_min: Option<i64>§dynamic_ef_max: Option<i64>§dynamic_ef_factor: Option<i64>§vector_cache_max_objects: Option<u64>§flat_search_cut_off: Option<u64>§cleanup_interval_seconds: Option<u64>§pq: Option<PqConfig>§skip: Option<bool>Implementations§
Source§impl VectorIndexConfigBuilder
impl VectorIndexConfigBuilder
Sourcepub fn new() -> VectorIndexConfigBuilder
pub fn new() -> VectorIndexConfigBuilder
Create a new builder for the VectorIndexConfig object.
This is the same as VectorIndexConfig::builder().
§Example
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let builder = VectorIndexConfigBuilder::new();Sourcepub fn with_distance(self, distance: DistanceMetric) -> VectorIndexConfigBuilder
pub fn with_distance(self, distance: DistanceMetric) -> VectorIndexConfigBuilder
Add a value to the optional distance value of the VectorIndexConfig.
§Parameters
- distance: the distance to use for the vector index config
§Example
use weaviate_community::collections::schema::{VectorIndexConfigBuilder, DistanceMetric};
let builder = VectorIndexConfigBuilder::new().with_distance(DistanceMetric::COSINE);Sourcepub fn with_ef(self, ef: i64) -> VectorIndexConfigBuilder
pub fn with_ef(self, ef: i64) -> VectorIndexConfigBuilder
Sourcepub fn with_ef_construction(
self,
ef_construction: u64,
) -> VectorIndexConfigBuilder
pub fn with_ef_construction( self, ef_construction: u64, ) -> VectorIndexConfigBuilder
Add a value to the optional ef_construction value of the VectorIndexConfig.
§Parameters
- ef_construction: the ef_construction to use for the vector index config
§Example
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let builder = VectorIndexConfigBuilder::new().with_ef_construction(5);Sourcepub fn with_max_connections(
self,
max_connections: u64,
) -> VectorIndexConfigBuilder
pub fn with_max_connections( self, max_connections: u64, ) -> VectorIndexConfigBuilder
Add a value to the optional max_connections value of the VectorIndexConfig.
§Parameters
- max_connections: the max_connections to use for the vector index config
§Example
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let builder = VectorIndexConfigBuilder::new().with_max_connections(5);Sourcepub fn with_dynamic_ef_min(
self,
dynamic_ef_min: i64,
) -> VectorIndexConfigBuilder
pub fn with_dynamic_ef_min( self, dynamic_ef_min: i64, ) -> VectorIndexConfigBuilder
Add a value to the optional dynamic_ef_min value of the VectorIndexConfig.
§Parameters
- dynamic_ef_min: the dynamic_ef_min to use for the vector index config
§Example
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let builder = VectorIndexConfigBuilder::new().with_dynamic_ef_min(5);Sourcepub fn with_dynamic_ef_max(
self,
dynamic_ef_max: i64,
) -> VectorIndexConfigBuilder
pub fn with_dynamic_ef_max( self, dynamic_ef_max: i64, ) -> VectorIndexConfigBuilder
Add a value to the optional dynamic_ef_max value of the VectorIndexConfig.
§Parameters
- dynamic_ef_max: the dynamic_ef_max to use for the vector index config
§Example
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let builder = VectorIndexConfigBuilder::new().with_dynamic_ef_max(10);Sourcepub fn with_dynamic_ef_factor(
self,
dynamic_ef_factor: i64,
) -> VectorIndexConfigBuilder
pub fn with_dynamic_ef_factor( self, dynamic_ef_factor: i64, ) -> VectorIndexConfigBuilder
Add a value to the optional dynamic_ef_factor value of the VectorIndexConfig.
§Parameters
- dynamic_ef_factor: the dynamic_ef_factor to use for the vector index config
§Example
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let builder = VectorIndexConfigBuilder::new().with_dynamic_ef_factor(3);Sourcepub fn with_vector_cache_max_objects(
self,
vector_cache_max_objects: u64,
) -> VectorIndexConfigBuilder
pub fn with_vector_cache_max_objects( self, vector_cache_max_objects: u64, ) -> VectorIndexConfigBuilder
Add a value to the optional vector_cache_max_objects value of the VectorIndexConfig.
§Parameters
- vector_cache_max_objects: the vector_cache_max_objects to use for the vector index config
§Example
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let builder = VectorIndexConfigBuilder::new().with_vector_cache_max_objects(3);Sourcepub fn with_flat_search_cut_off(
self,
flat_search_cut_off: u64,
) -> VectorIndexConfigBuilder
pub fn with_flat_search_cut_off( self, flat_search_cut_off: u64, ) -> VectorIndexConfigBuilder
Add a value to the optional flat_search_cut_off value of the VectorIndexConfig.
§Parameters
- flat_search_cut_off: the flat_search_cut_off to use for the vector index config
§Example
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let builder = VectorIndexConfigBuilder::new().with_flat_search_cut_off(3);Sourcepub fn with_cleanup_interval_seconds(
self,
cleanup_interval_seconds: u64,
) -> VectorIndexConfigBuilder
pub fn with_cleanup_interval_seconds( self, cleanup_interval_seconds: u64, ) -> VectorIndexConfigBuilder
Add a value to the optional cleanup_interval_seconds value of the VectorIndexConfig.
§Parameters
- cleanup_interval_seconds: the cleanup_interval_seconds to use for the vector index config
§Example
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let builder = VectorIndexConfigBuilder::new().with_cleanup_interval_seconds(3);Sourcepub fn with_pq(self, pq: PqConfig) -> VectorIndexConfigBuilder
pub fn with_pq(self, pq: PqConfig) -> VectorIndexConfigBuilder
Add a value to the optional pq value of the VectorIndexConfig.
§Parameters
- pq: the pq config to use for the vector index config
§Example
use weaviate_community::collections::schema::{
VectorIndexConfigBuilder,
PqConfig
};
let pq_config = PqConfig::builder().build();
let builder = VectorIndexConfigBuilder::new().with_pq(pq_config);Sourcepub fn with_skip(self, skip: bool) -> VectorIndexConfigBuilder
pub fn with_skip(self, skip: bool) -> VectorIndexConfigBuilder
Sourcepub fn build(self) -> VectorIndexConfig
pub fn build(self) -> VectorIndexConfig
Build the VectorIndexConfig from the VectorIndexConfigBuilder
§Example
Using VectorIndexConfigBuilder
use weaviate_community::collections::schema::VectorIndexConfigBuilder;
let config = VectorIndexConfigBuilder::new().build();Using VectorIndexConfig
use weaviate_community::collections::schema::VectorIndexConfig;
let config = VectorIndexConfig::builder().build();