[8.6] MOD-13884: Fix FT.HYBRID VSIM RANGE + FILTER returning zero results#8259
Merged
[8.6] MOD-13884: Fix FT.HYBRID VSIM RANGE + FILTER returning zero results#8259
Conversation
4 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.6 #8259 +/- ##
==========================================
- Coverage 83.78% 83.77% -0.02%
==========================================
Files 365 365
Lines 55291 55299 +8
Branches 14296 14296
==========================================
+ Hits 46323 46324 +1
- Misses 8807 8814 +7
Partials 161 161
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nafraf
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #8205 to
8.6.Describe the changes in the pull request
A clear and concise description of what the PR is solving, including:
When the document insertion order doesn't match the score order returned by the vector RANGE query, the query returns no results instead of the expected matches.
Root Cause
SkipTorequires child iterators to be sorted by document ID.We implemented a conditional approach based on whether an explicit FILTER clause is provided:
BY_IDordering (required for intersection iterator compatibility)BY_SCOREordering and skip filter integration so the vector node becomes the root directlytest_hybrid_vector_range_with_filterwas failing if the docs were ingested in different order of the vector results, now it works independent of ingestion order.Which additional issues this PR fixes
Main objects this PR modified
Mark if applicable
Release Notes
If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.
Note
Medium Risk
Changes AST construction and iterator ordering for hybrid
VSIM RANGEqueries, which can affect result ordering/selection when filters are present; coverage is improved with new C++/Python tests but behavior changes are query-critical.Overview
Fixes
FT.HYBRIDVSIM RANGEqueries returning empty/incorrect results when combined withFILTERby ensuring RANGE+FILTER runs the vector iterator inBY_IDorder (required for intersection/SkipTo).For RANGE queries without an explicit
FILTER, the vector node is now left as the AST root (via newParsedVectorData.skipFilterIntegration) to preserveBY_SCOREordering, andAREQ_ApplyContextskips parsing the implicit"*"wildcard since it would be immediately replaced.Updates and expands tests to cover RANGE behavior with/without
FILTERand to validate correctness independent of document insertion order.Written by Cursor Bugbot for commit 671fc60. This will update automatically on new commits. Configure here.