pub struct IvfIndexConfig {Show 13 fields
pub dimension: usize,
pub loading_mode: IndexLoadingMode,
pub distance_metric: DistanceMetric,
pub normalize_vectors: bool,
pub n_clusters: usize,
pub n_probe: usize,
pub max_vectors_per_segment: u64,
pub write_buffer_size: usize,
pub use_quantization: bool,
pub quantization_method: QuantizationMethod,
pub merge_factor: u32,
pub max_segments: u32,
pub embedder: Arc<dyn Embedder>,
}Expand description
Configuration specific to IVF index.
These settings control the behavior of the IVF (Inverted File) index implementation, including clustering parameters and storage options.
Fields§
§dimension: usizeVector dimension.
loading_mode: IndexLoadingModeIndex loading mode.
distance_metric: DistanceMetricDistance metric to use.
normalize_vectors: boolWhether to normalize vectors.
n_clusters: usizeNumber of clusters for IVF.
Higher values improve search quality but increase memory usage and construction time.
n_probe: usizeNumber of clusters to probe during search.
Higher values improve recall but increase search time.
max_vectors_per_segment: u64Maximum number of vectors per segment.
write_buffer_size: usizeBuffer size for writing operations (in bytes).
use_quantization: boolWhether to use quantization.
quantization_method: QuantizationMethodQuantization method.
merge_factor: u32Merge factor for segment merging.
max_segments: u32Maximum number of segments before merging.
embedder: Arc<dyn Embedder>Embedder for converting text/images to vectors.
This embedder is used when documents contain text or image fields that need to be
converted to vector representations. For field-specific embedders, use
PerFieldEmbedder.
Trait Implementations§
Source§impl Clone for IvfIndexConfig
impl Clone for IvfIndexConfig
Source§fn clone(&self) -> IvfIndexConfig
fn clone(&self) -> IvfIndexConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IvfIndexConfig
impl Debug for IvfIndexConfig
Source§impl Default for IvfIndexConfig
impl Default for IvfIndexConfig
Source§impl<'de> Deserialize<'de> for IvfIndexConfig
impl<'de> Deserialize<'de> for IvfIndexConfig
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>,
Auto Trait Implementations§
impl Freeze for IvfIndexConfig
impl !RefUnwindSafe for IvfIndexConfig
impl Send for IvfIndexConfig
impl Sync for IvfIndexConfig
impl Unpin for IvfIndexConfig
impl UnsafeUnpin for IvfIndexConfig
impl !UnwindSafe for IvfIndexConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.