Skip to content

fix(lancedb): honor path_filter in find_similar_chunks - #496

Merged
HananKavitzAmat merged 1 commit into
chunkhound:mainfrom
Saisinare:feat/lancedb-find-similar-path-filter
Nov 11, 2026
Merged

HananKavitzAmat merged 1 commit into
chunkhound:mainfrom
Saisinare:feat/lancedb-find-similar-path-filter

Conversation

@Saisinare

Copy link
Copy Markdown
Contributor

Fixes #107.

Why: find_similar_chunks on LanceDB logged a warning and ignored path_filter, so callers got neighbors from outside the requested scope, unlike DuckDB. Multi-hop search relies on this method.

The filter resolves matching file ids first and prefilters the vector search on them, so closer out-of-scope neighbors can't use up limit.

Note for review: this matches LanceDB's existing prefix behavior, so src also matches src2/, while DuckDB normalizes src to src/. Happy to align them here or separately. search_semantic has the same unimplemented path_filter; I left it out to keep this PR small.

Smoke tests pass.

🤖 Generated with Claude Code

The LanceDB provider logged a warning and ignored path_filter, so callers
got neighbors from outside the requested scope, unlike the DuckDB provider.

Resolve the matching file ids first and prefilter the vector search on them,
so closer out-of-scope neighbors cannot use up the limit.

Closes chunkhound#107

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 05:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@HananKavitzAmat
HananKavitzAmat self-requested a review November 11, 2026 12:12
@HananKavitzAmat HananKavitzAmat added the bug Something isn't working label Nov 11, 2026
@HananKavitzAmat

Copy link
Copy Markdown
Collaborator

looks good! Thanks

@HananKavitzAmat
HananKavitzAmat added this pull request to the merge queue Nov 11, 2026
Merged via the queue into chunkhound:main with commit 9ad84e6 Nov 11, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LanceDB: Implement path filtering for find_similar_chunks

3 participants