Skip to main content

search_memory

Function search_memory 

Source
pub fn search_memory(
    workspace: &Path,
    query: &str,
    max_results: usize,
    min_score: f64,
) -> Result<Vec<MemorySearchResult>, SessionStoreError>
Expand description

Cross-session memory search: scan every session’s derived memory envelope for facts matching query. Returns up to max_results results with score >= min_score, sorted by descending relevance.

Scoring uses BM25 (k1=1.2, b=0.75) over tokenized facts. Ties are deterministic by the stable session_id:index chunk identifier.