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 is based on the number of case-insensitive query matches found in each fact. A simple BMH-style substring count keeps this zero-dependency while still surfacing the most-relevant chunks first.