Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/better_code_review_graph/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2597,10 +2597,11 @@ def semantic_search_nodes(
emb_store.close()

# Keyword fallback
results = store.search_nodes(query, limit=limit * 2, repo=repo, as_of=as_of)

if kind:
results = [r for r in results if r.kind == kind]
# Bolt optimization: push node kind filtering to SQLite to avoid unnecessary
# Python-side materialization and prevent truncating valid results.
results = store.search_nodes(
query, kind=kind, limit=limit * 2, repo=repo, as_of=as_of
)

def score(node):
name_lower = node.name.lower()
Expand Down