Skip to main content

EntityMatcher

Trait EntityMatcher 

Source
pub trait EntityMatcher: Send + Sync {
    // Required method
    fn find_relevant(
        &self,
        query: &str,
        store: &GraphStore,
        top_k: usize,
    ) -> Vec<String>;
}
Expand description

Trait for finding relevant entities in a graph store given a query.

Implementations can use different matching strategies (keyword, embedding, hybrid, etc.). The default is KeywordMatcher.

Required Methods§

Source

fn find_relevant( &self, query: &str, store: &GraphStore, top_k: usize, ) -> Vec<String>

Find entity IDs relevant to the query, returning at most top_k results.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§