Version: 0.0.5 (stable)
agrag.candidates.search.search_candidates
search_candidates(graph_store:GraphStore, query:str, *, kind:CandidateKind | None = None, limit:int = 10) -> list[CandidateRecord]
Find candidates whose label or text holds any word of the query.
Search is lexical because candidates have no embedding. Rejected candidates are excluded, and words shorter than three characters are ignored.
Parameters:
- graph_store (
GraphStore) – The store that holds the candidates. - query (
str) – The words to look for. - kind (
CandidateKind | None) – Only this kind. None searches every kind. - limit (
int) – The most candidates to return.
Returns:
list[CandidateRecord]– Candidates ranked by matching-word count, then frequency.