pub struct CollectionConfig {
pub dense_vectors: HashMap<String, DenseVectorConfig>,
pub sparse_vectors: HashMap<String, SparseVectorConfig>,
pub payload_indexes: HashMap<String, PayloadIndex>,
}Expand description
The tenant-facing collection config.
Vector maps are keyed by vector name; the empty name "" is the unnamed
default vector. Payload indexes are keyed by payload field name
(JSON path, e.g. user_id or meta.tags).
Fields§
§dense_vectors: HashMap<String, DenseVectorConfig>§sparse_vectors: HashMap<String, SparseVectorConfig>§payload_indexes: HashMap<String, PayloadIndex>Implementations§
Source§impl CollectionConfig
impl CollectionConfig
pub fn new() -> Self
Sourcepub fn dense_vector(self, config: DenseVectorConfig) -> Self
pub fn dense_vector(self, config: DenseVectorConfig) -> Self
Register a single unnamed dense vector (empty name "").
Sourcepub fn named_dense_vector(
self,
name: impl Into<String>,
config: DenseVectorConfig,
) -> Self
pub fn named_dense_vector( self, name: impl Into<String>, config: DenseVectorConfig, ) -> Self
Register a named dense vector.
Sourcepub fn sparse_vector(self, config: SparseVectorConfig) -> Self
pub fn sparse_vector(self, config: SparseVectorConfig) -> Self
Register a single unnamed sparse vector (empty name "").
Sourcepub fn named_sparse_vector(
self,
name: impl Into<String>,
config: SparseVectorConfig,
) -> Self
pub fn named_sparse_vector( self, name: impl Into<String>, config: SparseVectorConfig, ) -> Self
Register a named sparse vector.
Sourcepub fn payload_index(
self,
field: impl Into<String>,
index: impl Into<PayloadIndex>,
) -> Self
pub fn payload_index( self, field: impl Into<String>, index: impl Into<PayloadIndex>, ) -> Self
Add a payload index for the given field path.
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 CollectionConfig
impl<'de> Deserialize<'de> for CollectionConfig
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
Wrap the input message
T in a tonic::Request