pub struct CollectionConfig {
pub dimension: usize,
pub distance: Distance,
pub vector_space: Option<String>,
pub index: IndexConfig,
}Expand description
Collection-wide vector and index configuration.
Fields§
§dimension: usizeRequired number of components in every stored and query vector.
distance: DistanceDistance used to score vectors.
vector_space: Option<String>Optional application-defined vector-space identity checked by queries.
index: IndexConfigDeterministic approximate-index configuration.
Implementations§
Source§impl CollectionConfig
impl CollectionConfig
Sourcepub fn new(dimension: usize) -> Self
pub fn new(dimension: usize) -> Self
Creates a cosine collection configuration for the given dimension.
Sourcepub fn with_vector_space(self, vector_space: impl Into<String>) -> Self
pub fn with_vector_space(self, vector_space: impl Into<String>) -> Self
Assigns an application-defined vector-space identity.
Sourcepub fn with_index(self, index: IndexConfig) -> Self
pub fn with_index(self, index: IndexConfig) -> Self
Replaces deterministic approximate-query defaults.
The legacy LSH construction fields only affect format-version-1 roots.
Trait Implementations§
Source§impl Clone for CollectionConfig
impl Clone for CollectionConfig
Source§impl Debug for CollectionConfig
impl Debug for CollectionConfig
Source§impl Default for CollectionConfig
impl Default for CollectionConfig
Source§impl<'de> Deserialize<'de> for CollectionConfigwhere
CollectionConfig: Default,
impl<'de> Deserialize<'de> for CollectionConfigwhere
CollectionConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CollectionConfig
Source§impl PartialEq for CollectionConfig
impl PartialEq for CollectionConfig
Source§impl Serialize for CollectionConfig
impl Serialize for CollectionConfig
impl StructuralPartialEq for CollectionConfig
Auto Trait Implementations§
impl Freeze for CollectionConfig
impl RefUnwindSafe for CollectionConfig
impl Send for CollectionConfig
impl Sync for CollectionConfig
impl Unpin for CollectionConfig
impl UnsafeUnpin for CollectionConfig
impl UnwindSafe for CollectionConfig
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
Mutably borrows from an owned value. Read more
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more