Skip to content

VSIM FILTER works without WITHATTRIBS by fetching attributes internally#1572

Merged
hailangx merged 2 commits intohaixu/vector-filter-postprocessingfrom
copilot/sub-pr-1570-again
Feb 20, 2026
Merged

VSIM FILTER works without WITHATTRIBS by fetching attributes internally#1572
hailangx merged 2 commits intohaixu/vector-filter-postprocessingfrom
copilot/sub-pr-1570-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 20, 2026

VSIM ... FILTER expr without WITHATTRIBS previously returned BadParams because post-filtering requires attributes but they were only fetched when includeAttributes=true.

Changes

  • VectorManager.cs (ValueSimilarity + ElementSimilarity): When a filter is present but includeAttributes is false, attributes are now fetched into a temporary buffer, used for filtering, then discarded. Only the filtered IDs (and optionally distances) are returned.

  • RespVectorSetTests.cs: Added VSIMWithFilterButWithoutWithAttribs to cover this path.

Example

# Previously returned an error; now works correctly
VSIM myvecs VALUES 3 0.1 0.2 0.3 FILTER ".year > 2000" COUNT 5

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: hailangx <3389245+hailangx@users.noreply.github.com>
Copilot AI changed the title [WIP] Update support for post-filter in vector search results VSIM FILTER works without WITHATTRIBS by fetching attributes internally Feb 20, 2026
Copilot AI requested a review from hailangx February 20, 2026 01:20
@hailangx hailangx marked this pull request as ready for review February 20, 2026 01:26
@hailangx hailangx merged commit c177265 into haixu/vector-filter-postprocessing Feb 20, 2026
1 check passed
@hailangx hailangx deleted the copilot/sub-pr-1570-again branch February 20, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants