Skip to content

feat: support vector query pruning by index segments#6376

Merged
Xuanwo merged 5 commits intomainfrom
xuanwo/index-segment-query-pruning
Apr 2, 2026
Merged

feat: support vector query pruning by index segments#6376
Xuanwo merged 5 commits intomainfrom
xuanwo/index-segment-query-pruning

Conversation

@Xuanwo
Copy link
Copy Markdown
Collaborator

@Xuanwo Xuanwo commented Apr 1, 2026

This change adds with_index_segments() for vector queries and makes ANN planning prune to the selected index segments instead of always searching the full logical index. It also makes with_fragments() participate in segment selection and flat fallback computation so fragment-filtered and segment-filtered searches stay correct when only part of the logical index is queried.

This feature will make distributed search much faster to avoid loading not related index segments.


FTS should also support this, will add after #6305 been merged.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@Xuanwo Xuanwo marked this pull request as ready for review April 1, 2026 19:44
@Xuanwo Xuanwo changed the title Support vector query pruning by index segments feat: support vector query pruning by index segments Apr 1, 2026
@github-actions github-actions bot added the enhancement New feature or request label Apr 1, 2026
@Xuanwo Xuanwo mentioned this pull request Apr 1, 2026
26 tasks
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 93.98907% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance/src/dataset/scanner.rs 93.98% 12 Missing and 10 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

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

Nice work!

@Xuanwo Xuanwo merged commit 402f7b7 into main Apr 2, 2026
28 checks passed
@Xuanwo Xuanwo deleted the xuanwo/index-segment-query-pruning branch April 2, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants