Add support for warnings in FT.SEARCH, AGGREGATE and HYBRID#514
Merged
Conversation
8667682 to
536e82e
Compare
mgravell
reviewed
Jul 10, 2026
mgravell
reviewed
Jul 10, 2026
mgravell
reviewed
Jul 10, 2026
mgravell
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, but I'm wary of the list allocs that happen on the happy (no warnings to report) path
mgravell
approved these changes
Jul 10, 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.
Note
Medium Risk
Changes public search result shapes and RESP3 reply parsing; incorrect parsing could hide or misreport timeout/partial-result warnings, though behavior is additive (empty warnings when absent).
Overview
Adds public
WarningsonSearchResult,AggregationResult, andHybridSearchResultso callers can see RediSearch server messages (e.g. query timeout under thereturn/return-stricton-timeout policy). RESP3 FT.SEARCH and FT.AGGREGATE replies are parsed via a newResponseParser.ParseWarningshelper that reads the top-level"warning"map field; FT.HYBRID warning parsing is enabled and exposed (works on RESP2 and RESP3).Adds
AggregationRequest.AddScores()to send theADDSCORESoption and surface@__scorein the aggregation pipeline.Integration tests cover
search-on-timeout(failthrowsRedisServerException;returnyields partial results with timeout text inWarnings) for FT.SEARCH, FT.AGGREGATE, and FT.HYBRID (Redis ≥ 8.9). Shared test helpers:AssertIndexSizeandSetSearchOnTimeoutfor cluster-wide config.Reviewed by Cursor Bugbot for commit 7550da6. Bugbot is set up for automated code reviews on this repo. Configure here.