pub fn regenerate_stale<I: VectorIndex, E: Embedder>(
db: &I,
registry: &Registry,
embedder: &E,
task: TaskKind,
budget: Option<usize>,
) -> Result<RegenReport, RegenError>Expand description
Regenerate stale embeddings for task in embedder’s platform partition, re-deriving the
work-list from stale_embedding_assets on each call.
budget bounds the invocation: Some(n) rebuilds up to n assets (the background chunk;
call again until RegenReport::is_complete); None drains the whole partition. Assets are
processed in the work-list’s sorted order, so a bounded run is deterministic and its remainder
is exactly the tail. Each asset’s fresh vector is inserted with a per-asset replace before the
next is processed, so the run is safe to interrupt at any point.
Refuses a NonCanonicalEmbedder (an embedder not producing the current canonical tuple) before
touching the index.