pub struct IndexConfig {
pub num_threads: usize,
pub num_indexing_threads: usize,
pub num_compression_threads: usize,
pub term_cache_blocks: usize,
pub store_cache_blocks: usize,
pub max_indexing_memory_bytes: usize,
pub merge_policy: Box<dyn MergePolicy>,
pub optimization: IndexOptimization,
pub reload_interval_ms: u64,
pub max_concurrent_merges: usize,
pub merge_bp_time_budget: Option<Duration>,
pub bp_memory_budget_bytes: usize,
}Expand description
Index configuration
Fields§
§num_threads: usizeNumber of threads for CPU-intensive tasks (search parallelism)
num_indexing_threads: usizeNumber of parallel segment builders (documents distributed round-robin)
num_compression_threads: usizeNumber of threads for parallel block compression within each segment
term_cache_blocks: usizeBlock cache size for term dictionary per segment
store_cache_blocks: usizeBlock cache size for document store per segment
max_indexing_memory_bytes: usizeMax memory (bytes) across all builders before auto-commit (global limit)
merge_policy: Box<dyn MergePolicy>Merge policy for background segment merging
optimization: IndexOptimizationIndex optimization mode (adaptive, size-optimized, performance-optimized)
reload_interval_ms: u64Reload interval in milliseconds for IndexReader (how often to check for new segments)
max_concurrent_merges: usizeMaximum number of concurrent background merges (default: 4)
merge_bp_time_budget: Option<Duration>Wall-clock budget for merge-time BP reorder per field (only applies
when the index has reorder_on_merge). A truncated pass still writes
a valid, better-ordered segment; it is marked bp_converged = false
and the background optimizer deepens it later (warm-started).
None = unbudgeted (BP runs to full depth inside the merge, which can
hold a merge slot for 10-30+ minutes on 10M+ doc outputs).
bp_memory_budget_bytes: usizeMemory budget (bytes) for the BP forward index during reorder passes (merge-time and background). When a large segment’s forward index would exceed this, the highest-df dims are dropped from BP’s input (logged loudly) — clustering quality degrades gracefully. Production evidence: 18M-doc merges exceed the 2 GB default and drop ~10% of eligible dims; hosts with headroom should raise this.
Trait Implementations§
Source§impl Clone for IndexConfig
impl Clone for IndexConfig
Source§fn clone(&self) -> IndexConfig
fn clone(&self) -> IndexConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IndexConfig
impl Debug for IndexConfig
Auto Trait Implementations§
impl !RefUnwindSafe for IndexConfig
impl !UnwindSafe for IndexConfig
impl Freeze for IndexConfig
impl Send for IndexConfig
impl Sync for IndexConfig
impl Unpin for IndexConfig
impl UnsafeUnpin for IndexConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> 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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<E> ResultError for E
impl<T> ResultType for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.