pub struct DenseVectorConfig {
pub size: u64,
pub distance: Distance,
pub multivector: bool,
pub precision_tier: Option<PrecisionTier>,
}Expand description
Configuration of a single dense (embedding) vector.
Fields§
§size: u64Dimensionality of the embedding, e.g. 512, 1536, 3072.
distance: DistanceDistance metric used to compare vectors.
multivector: boolStore several sub-vectors per point and compare with max-sim.
precision_tier: Option<PrecisionTier>Precision/cost trade-off for this vector. Unset: HIGH.
Implementations§
Source§impl DenseVectorConfig
impl DenseVectorConfig
Sourcepub fn new(size: u64, distance: Distance) -> Self
pub fn new(size: u64, distance: Distance) -> Self
Create a dense vector config with the given size and distance.
Sourcepub fn multivector(self, multivector: bool) -> Self
pub fn multivector(self, multivector: bool) -> Self
Enable multi-vector (late-interaction) storage.
Sourcepub fn precision_tier(self, tier: PrecisionTier) -> Self
pub fn precision_tier(self, tier: PrecisionTier) -> Self
Set the precision/cost trade-off.
Trait Implementations§
Source§impl Clone for DenseVectorConfig
impl Clone for DenseVectorConfig
Source§impl Debug for DenseVectorConfig
impl Debug for DenseVectorConfig
Source§impl<'de> Deserialize<'de> for DenseVectorConfig
impl<'de> Deserialize<'de> for DenseVectorConfig
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 DenseVectorConfig
Source§impl PartialEq for DenseVectorConfig
impl PartialEq for DenseVectorConfig
Source§impl Serialize for DenseVectorConfig
impl Serialize for DenseVectorConfig
impl StructuralPartialEq for DenseVectorConfig
Auto Trait Implementations§
impl Freeze for DenseVectorConfig
impl RefUnwindSafe for DenseVectorConfig
impl Send for DenseVectorConfig
impl Sync for DenseVectorConfig
impl Unpin for DenseVectorConfig
impl UnsafeUnpin for DenseVectorConfig
impl UnwindSafe for DenseVectorConfig
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