Skip to main content

Module graph_query

Module graph_query 

Source

Structs§

Bm25Index
ServeEdge
ServeGraph
ServeNode

Enums§

LoadError

Constants§

DEFAULT_MAX_GRAPH_FILE_BYTES
RRF_K

Functions§

bfs
communities_from_graph
compute_idf
dfs
filter_graph_by_context
find_node
has_chinese
infer_context_filters
is_searchable
load_graph
load_graph_with_cap
normalize_context_filters
pick_seeds
query_graph_text
query_graph_text_hybrid
Hybrid query: BM25 lexical + optional dense cosine, fused with RRF.
query_terms
query_top_nodes
Returns (node_id, label, source_file) for the top-K seeds from hybrid search.
resolve_context_filters
resolve_query
Load global graph from graph_path, run BM25 query, return formatted source bodies for the top-k matching nodes. No dense embeddings (CLI).
rrf
Reciprocal Rank Fusion over multiple ranked lists. k=60 is standard.
score_nodes
search_tokens
segment_chinese
split_camel
Split camelCase/PascalCase into lowercase tokens. Snake_case returned as-is (already meaningful in BM25). Original token is NOT included — caller already has it in bm25_ranked.
strip_diacritics
subgraph_to_text