Skip to content

Conversation

mgravell
Copy link
Contributor

@mgravell mgravell commented Sep 9, 2025

Advance notice: this PR looks worse than it is; most of the delta was from trying to get the CI green when enabling FT.* tests on cluster. It was... "fun". For small values of "fun".


fix #239

  • update SE.Redis ref to allow new GetServer(RedisKey) usage
  • add utility API to capture an IServer and database if using cluster
  • create internal AggregationResult subclass that includes the IServer
  • capture server in Aggregate[Async]
  • create new overloads for CusorDel[Async] and CursorRead[Async] that take AggregationResult, and push consumers towards that overload via [Obsolete(...)]
    • use captured server/database when appropriate
  • use the new API from tests
  • add new I[Async]Enumerable API for simplicity: Aggregate[Async]Enumerable
  • add tests for new API
  • use cluster env from most of the SearchTests, and fixup any deviations
    • noting that many FT.* tests are.... "quirky" before v8, and have been grandfathered (i.e. skip on cluster < Redis v8) - we still have full coverage for standalone and on v8 onwards, which feels reasonable
  • fix the CI tests for .NET 9 (csproj condition failure)

Public API delta:

+ NRedisStack.SearchCommands.CursorDel(NRedisStack.Search.AggregationResult! result) -> bool
+ NRedisStack.SearchCommandsAsync.CursorDelAsync(NRedisStack.Search.AggregationResult! result) -> System.Threading.Tasks.Task<bool>!

+ NRedisStack.SearchCommands.CursorRead(NRedisStack.Search.AggregationResult! result, int? count = null) -> NRedisStack.Search.AggregationResult!
+ NRedisStack.SearchCommandsAsync.CursorReadAsync(NRedisStack.Search.AggregationResult! result, int? count = null) -> System.Threading.Tasks.Task<NRedisStack.Search.AggregationResult!>!

+ NRedisStack.SearchCommands.AggregateEnumerable(string! index, NRedisStack.Search.AggregationRequest! query) -> System.Collections.Generic.IEnumerable<NRedisStack.Search.Aggregation.Row>!
+ NRedisStack.SearchCommandsAsync.AggregateAsyncEnumerable(string! index, NRedisStack.Search.AggregationRequest! query) -> + System.Collections.Generic.IAsyncEnumerable<NRedisStack.Search.Aggregation.Row>!

and same to interfaces; also, the pre-existing CursorDel[Async] and CursorRead[Async] APIs taking cursors have been marked [Obsolete] suggesting users to use the new methods.

- update SE.Redis ref to allow new GetServer(RedisKey) usage
- add utility API to capture an IServer and database if using cluster
- create internal AggregationResult subclass that includes the IServer
- capture server in Aggregate[Async]
- create new overloads for CusorDel[Async] and CursorRead[Async] that take AggregationResult, and push consumers towards that overload
  - use captured server/database when appropriate
- use the new API from tests
- add new I[Async]Enumerable API for simplicity: AggregateEnumerable[Async]
- add tests for new API
- use cluster env from cursor tests
@mgravell mgravell requested a review from atakavci September 11, 2025 11:10
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.

Cursor Read doesn't work in cluster
1 participant