Description
codegraph_find_code with fuzzy_search=true and edit_distance=2 returns zero results for queries that differ by just 1 character from an existing function name.
Steps to Reproduce
pip install codegraphcontext==0.3.1
cgc index /path/to/project # project contains a function named "myFunction"
Then via MCP:
# Exact search works:
codegraph_find_code(query="myFunction")
# → returns myFunction correctly
# Fuzzy search fails:
codegraph_find_code(query="myFuncton", fuzzy_search=true, edit_distance=2)
# → returns 0 results
Expected Behavior
Fuzzy search with edit_distance=2 should find myFunction when querying myFuncton (edit distance = 1, well within threshold).
Actual Behavior
{
"query": "myfuncton",
"functions_by_name": [],
"classes_by_name": [],
"variables_by_name": [],
"content_matches": [],
"ranked_results": [],
"total_matches": 0
}
Note: the query is lowercased to myfuncton in the response, suggesting the fuzzy search may be operating on a lowercased version while the index stores original case — potentially causing the mismatch.
Environment
- codegraphcontext: 0.3.1
- Database backend: KùzuDB (default)
- Python: 3.12.3
- OS: Linux (Ubuntu)
Description
codegraph_find_codewithfuzzy_search=trueandedit_distance=2returns zero results for queries that differ by just 1 character from an existing function name.Steps to Reproduce
pip install codegraphcontext==0.3.1 cgc index /path/to/project # project contains a function named "myFunction"Then via MCP:
Expected Behavior
Fuzzy search with
edit_distance=2should findmyFunctionwhen queryingmyFuncton(edit distance = 1, well within threshold).Actual Behavior
{ "query": "myfuncton", "functions_by_name": [], "classes_by_name": [], "variables_by_name": [], "content_matches": [], "ranked_results": [], "total_matches": 0 }Note: the query is lowercased to
myfunctonin the response, suggesting the fuzzy search may be operating on a lowercased version while the index stores original case — potentially causing the mismatch.Environment