Skip to content

MOD-12450: FT.HYBRID - Support vector blob only through parameter, drop support for inlined blob#7768

Merged
Itzikvaknin merged 9 commits intomasterfrom
ivaknin-disable_direct_vector_blob_on_ft_hybrid
Dec 15, 2025
Merged

MOD-12450: FT.HYBRID - Support vector blob only through parameter, drop support for inlined blob#7768
Itzikvaknin merged 9 commits intomasterfrom
ivaknin-disable_direct_vector_blob_on_ft_hybrid

Conversation

@Itzikvaknin
Copy link
Collaborator

@Itzikvaknin Itzikvaknin commented Dec 14, 2025

Describe the changes in the pull request

Support vector blob in FT.HYBRID VSIM @vector_field vector only through parameter, drop support for inlined blob

A clear and concise description of what the PR is solving, including:

  1. Current:
    Both FT.HYBRID SEARCH * VSIM \x9a\x99 and FT.HYBRID SEARCH * VSIM $BLOB PARAMS 2 BLOB \x9a\x99 are valid.

  2. Change:
    Only FT.HYBRID SEARCH * VSIM $BLOB PARAMS 2 BLOB \x9a\x99 is valid

  3. Outcome: The bug where vectors beginning with a value similar to $ were misinterpreted has been resolved.

Result:
The bug where vectors beginning with a value resembling $ were misinterpreted has been resolved.

Which additional issues this PR fixes

  1. MOD-...
  2. #...

Main objects this PR modified

  1. ...

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Note

Enforces parameter-only vector blobs in FT.HYBRID VSIM and updates all tests to use $BLOB with PARAMS, removing direct inline blob support.

  • Parser (src/hybrid/parse_hybrid.c):
    • Enforce VSIM vector argument must be a parameter (e.g., $BLOB); inline blobs now return syntax error with a clear message.
    • Keep default KNN setup and existing clause parsing; no behavioral changes elsewhere.
  • Tests:
    • Update all hybrid tests (C++ and Python) to pass vectors via $BLOB and PARAMS.
    • Remove the positive test for direct vector input; add a negative test asserting direct vectors fail.
    • Adjust error, dialect, filter, iterator, pipeline, scorer, yield, groupby, expire, OOM, and response format tests to the new parameterized vector pattern.

Written by Cursor Bugbot for commit 38b58a6. This will update automatically on new commits. Configure here.

- Enforce vector input is parameter &
- Add subqueries count to FT.HYBRID

Fix tests to support that
@Itzikvaknin Itzikvaknin requested a review from nafraf December 14, 2025 14:34
@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.74%. Comparing base (fd1b5c2) to head (38b58a6).
⚠️ Report is 28 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7768      +/-   ##
==========================================
- Coverage   84.77%   84.74%   -0.04%     
==========================================
  Files         351      351              
  Lines       54761    54800      +39     
  Branches    14727    14764      +37     
==========================================
+ Hits        46426    46442      +16     
- Misses       8136     8159      +23     
  Partials      199      199              
Flag Coverage Δ
flow 85.30% <0.00%> (-0.08%) ⬇️
unit 52.11% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Itzikvaknin Itzikvaknin requested a review from kei-nan December 15, 2025 13:46
@Itzikvaknin Itzikvaknin added this pull request to the merge queue Dec 15, 2025
Merged via the queue into master with commit 9fb37a3 Dec 15, 2025
26 checks passed
@Itzikvaknin Itzikvaknin deleted the ivaknin-disable_direct_vector_blob_on_ft_hybrid branch December 15, 2025 16:42
@Itzikvaknin
Copy link
Collaborator Author

/backport

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 8.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 8.4
git worktree add -d .worktree/backport-7768-to-8.4 origin/8.4
cd .worktree/backport-7768-to-8.4
git switch --create backport-7768-to-8.4
git cherry-pick -x 9fb37a39e23d74ae83f97a5055f8e6e63349a7d1

Itzikvaknin added a commit that referenced this pull request Dec 17, 2025
…op support for inlined blob (#7768)

* Intermediate work
- Enforce vector input is parameter &
- Add subqueries count to FT.HYBRID

Fix tests to support that

* All tests pass

* Remove wrong comment

* Fix testWarningsAndErrorsStandalone to use better use cases

* Fix test_info_modules:testWarningsAndErrorsCluster.test_args_errors_cluster

* Add (ParseHybridTest, testDirectVector) to verify correct error code&massage

* CR comments

* Fix hybrid query in  test_info_modules:testWarningsAndErrorsCluster.test_syntax_errors_cluster

* Fix testMissingSearchArgument
vishal-bala added a commit to redis/redis-vl-python that referenced this pull request Dec 17, 2025
Support for inlined blobs was dropped in FT.HYBRID due to some sequences
being misinterpreted (see
RediSearch/RediSearch#7768). This PR updates the
hybrid search implementation to pass vector data to hybrid searches via
parameter substitution instead.
github-merge-queue bot pushed a commit that referenced this pull request Dec 17, 2025
…er, drop support for inlined blob (#7823)

* MOD-12450: FT.HYBRID - Support vector blob only through parameter, drop support for inlined blob (#7768)

* Intermediate work
- Enforce vector input is parameter &
- Add subqueries count to FT.HYBRID

Fix tests to support that

* All tests pass

* Remove wrong comment

* Fix testWarningsAndErrorsStandalone to use better use cases

* Fix test_info_modules:testWarningsAndErrorsCluster.test_args_errors_cluster

* Add (ParseHybridTest, testDirectVector) to verify correct error code&massage

* CR comments

* Fix hybrid query in  test_info_modules:testWarningsAndErrorsCluster.test_syntax_errors_cluster

* Fix testMissingSearchArgument

* Continuation of the conflicts merge

* Remove whitespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants