Skip to main content

incremental_index

Function incremental_index 

Source
pub fn incremental_index(
    root: &Path,
    backends: &[&dyn EmbedBackend],
    tokenizer: &Tokenizer,
    cfg: &SearchConfig,
    profiler: &Profiler,
    model_repo: &str,
    cache_dir_override: Option<&Path>,
    repo_level: bool,
) -> Result<(HybridIndex, ReindexStats)>
Expand description

Load or incrementally update a persistent index.

  1. Resolve cache directory
  2. If manifest exists and model matches: Merkle diff, re-embed dirty files
  3. If no manifest: full embed from scratch
  4. Rebuild SearchIndex from all cached objects

§Errors

Returns an error if embedding fails or the cache directory is inaccessible.