pub struct UpdateConfig {
pub batch_size: usize,
pub kmeans_niters: usize,
pub max_points_per_centroid: usize,
pub n_samples_kmeans: Option<usize>,
pub seed: u64,
pub start_from_scratch: usize,
pub buffer_size: usize,
pub force_cpu: bool,
}Expand description
Configuration for index updates.
Fields§
§batch_size: usizeBatch size for processing documents (default: 50,000)
kmeans_niters: usizeNumber of K-means iterations for centroid expansion (default: 4)
max_points_per_centroid: usizeMax points per centroid for K-means (default: 256)
n_samples_kmeans: Option<usize>Number of samples for K-means (default: auto-calculated)
seed: u64Random seed (default: 42)
start_from_scratch: usizeIf index has fewer docs than this, rebuild from scratch (default: 999)
buffer_size: usizeBuffer size before triggering centroid expansion (default: 100)
force_cpu: boolForce CPU execution for K-means even when CUDA feature is enabled.
Implementations§
Source§impl UpdateConfig
impl UpdateConfig
Sourcepub fn to_kmeans_config(&self) -> ComputeKmeansConfig
pub fn to_kmeans_config(&self) -> ComputeKmeansConfig
Convert to ComputeKmeansConfig for centroid expansion.
Trait Implementations§
Source§impl Clone for UpdateConfig
impl Clone for UpdateConfig
Source§fn clone(&self) -> UpdateConfig
fn clone(&self) -> UpdateConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpdateConfig
impl Debug for UpdateConfig
Source§impl Default for UpdateConfig
impl Default for UpdateConfig
Source§impl<'de> Deserialize<'de> for UpdateConfig
impl<'de> Deserialize<'de> for UpdateConfig
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
Auto Trait Implementations§
impl Freeze for UpdateConfig
impl RefUnwindSafe for UpdateConfig
impl Send for UpdateConfig
impl Sync for UpdateConfig
impl Unpin for UpdateConfig
impl UnwindSafe for UpdateConfig
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,
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