pub struct OptimizersConfigDiffBuilder { /* private fields */ }
Expand description
Builder for OptimizersConfigDiff
.
Implementations§
source§impl OptimizersConfigDiffBuilder
impl OptimizersConfigDiffBuilder
sourcepub fn deleted_threshold(self, value: f64) -> Self
pub fn deleted_threshold(self, value: f64) -> Self
The minimal fraction of deleted vectors in a segment, required to perform segment optimization
sourcepub fn vacuum_min_vector_number(self, value: u64) -> Self
pub fn vacuum_min_vector_number(self, value: u64) -> Self
The minimal number of vectors in a segment, required to perform segment optimization
sourcepub fn default_segment_number(self, value: u64) -> Self
pub fn default_segment_number(self, value: u64) -> Self
Target amount of segments the optimizer will try to keep. Real amount of segments may vary depending on multiple parameters:
- Amount of stored points.
- Current write RPS.
It is recommended to select the default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads.
sourcepub fn max_segment_size(self, value: u64) -> Self
pub fn max_segment_size(self, value: u64) -> Self
Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.
If indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.
sourcepub fn memmap_threshold(self, value: u64) -> Self
pub fn memmap_threshold(self, value: u64) -> Self
Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.
Memmap storage is disabled by default, to enable it, set this threshold to a reasonable value.
To disable memmap storage, set this to 0
.
Note: 1Kb = 1 vector of size 256
sourcepub fn indexing_threshold(self, value: u64) -> Self
pub fn indexing_threshold(self, value: u64) -> Self
Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing
Default value is 20,000, based on <https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md.>
To disable vector indexing, set to 0
.
Note: 1kB = 1 vector of size 256.
sourcepub fn flush_interval_sec(self, value: u64) -> Self
pub fn flush_interval_sec(self, value: u64) -> Self
Interval between forced flushes.
sourcepub fn max_optimization_threads(self, value: u64) -> Self
pub fn max_optimization_threads(self, value: u64) -> Self
Max number of threads (jobs) for running optimizations per shard.
Note: each optimization job will also use max_indexing_threads
threads by itself for index building.
If null - have no limit and choose dynamically to saturate CPU.
If 0 - no optimization threads, optimizations will be disabled.
source§impl OptimizersConfigDiffBuilder
impl OptimizersConfigDiffBuilder
sourcepub fn build(self) -> OptimizersConfigDiff
pub fn build(self) -> OptimizersConfigDiff
Builds the desired type. Can often be omitted.
Trait Implementations§
source§impl From<OptimizersConfigDiffBuilder> for OptimizersConfigDiff
impl From<OptimizersConfigDiffBuilder> for OptimizersConfigDiff
source§fn from(value: OptimizersConfigDiffBuilder) -> Self
fn from(value: OptimizersConfigDiffBuilder) -> Self
Auto Trait Implementations§
impl Freeze for OptimizersConfigDiffBuilder
impl RefUnwindSafe for OptimizersConfigDiffBuilder
impl Send for OptimizersConfigDiffBuilder
impl Sync for OptimizersConfigDiffBuilder
impl Unpin for OptimizersConfigDiffBuilder
impl UnwindSafe for OptimizersConfigDiffBuilder
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
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>
T
in a tonic::Request