Skip to main content

backfill_missing

Function backfill_missing 

Source
pub fn backfill_missing(
    index: &mut KnowledgeEmbeddingIndex,
    engine: &EmbeddingEngine,
    knowledge: &ProjectKnowledge,
    cap: usize,
) -> usize
Expand description

Lazy vector backfill: embeds up to cap current facts that are missing from the side-car index. Facts land without vectors on two paths — the consolidation/ETL writers never embed at all, and a non-blocking remember skips its side-car while the engine is still warming up. Without a healer those facts stay invisible to mode=semantic recall until a manual embeddings_reindex. Called from remember under the per-project lock once the engine is warm, so active projects self-heal incrementally. Returns the number of facts embedded.