run_embed_pending

Function run_embed_pending 

Source
pub async fn run_embed_pending(
    config: &Config,
    limit: Option<usize>,
    batch_size_override: Option<usize>,
    dry_run: bool,
) -> Result<()>
Expand description

Backfill embeddings for chunks that are missing or have stale hashes.

Finds all chunks where either:

  1. No embedding exists for the current model, or
  2. The embedding’s stored hash doesn’t match the chunk’s current text hash.

§Arguments

  • config — Application configuration.
  • limit — Optional cap on the number of chunks to process.
  • batch_size_override — Override the config’s embedding.batch_size.
  • dry_run — If true, report counts without writing anything.

§Errors

Returns an error if the embedding provider is disabled.