Skip to main content

search_nodes

Function search_nodes 

Source
pub fn search_nodes(
    conn: &Connection,
    query: &str,
    limit: usize,
) -> Result<Vec<GraphNode>>
Expand description

Search nodes using FTS5 MATCH, ranked by BM25 relevance then importance.

The query is escaped as a phrase literal, so arbitrary user text is safe. A malformed-query error is degraded to an empty result rather than an Err: full-text is one signal among several in crate::graph::recall::smart_recall, and a bad hint must not take down the whole recall.