[8.4] [MOD-12647] fix: handle the case in Coordinator when SCORE is sent alone without extra fields.#7553
Merged
redisearch-backport-pull-request[bot] merged 1 commit into8.4from Nov 27, 2025
Conversation
…one without extra fields. (#7492) * fix: Do not send score alone if Expired flag is set * test: add test_expire_ft_hybrid * improve test * do not send NULL, simply avoid serialize result if expired * improving test * handle more complete hybrid expire test * small change in test * revert changes in hybrid exec * remove assertion that cannot be guaranteed, and handle no extra_attributes in response from shard * handle both resp protocols (cherry picked from commit b916f07)
JoanFM
approved these changes
Nov 27, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.4 #7553 +/- ##
==========================================
- Coverage 85.91% 85.88% -0.03%
==========================================
Files 330 330
Lines 52519 52521 +2
Branches 12001 12001
==========================================
- Hits 45120 45108 -12
- Misses 7232 7246 +14
Partials 167 167
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:
|
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 #7492 to
8.4.Note
Safely handle hybrid results that contain a score without fields (e.g., expired docs), add RESP3-aware parsing helper, and introduce RESP2/3 FT.HYBRID expiration tests.
extra_attributesmay be absent (e.g., expired docs): introducehas_fieldsand iterate fields only when present.scorehandling; relax assertions to allow missing fields in RESP2/RESP3 while validating lengths when present.expire_ft_hybrid_testand run for both RESP2/RESP3 to verify only non-expired docs are returned and attributes present.get_results_from_hybrid_responseto parse RESP3 dict replies and return(results, total_results).Written by Cursor Bugbot for commit 70656cd. This will update automatically on new commits. Configure here.