You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Limit(offset, count) returning combined total of records, not count quantity. #508
For example I create a query using Limit(20, 10), it returns 30 documents instead of just 10.
var db = _connectionMultiplexer.GetDatabase();
var json = db.FT();
var query = new Query("*").SetNoContent(false).SetSortBy("", true).Limit(search.start, search.length);
var results = json.Search("idx1", query);
I've tried with variations, removing the extra setnotcontent and sort but I get the same result.
If I directly query my redis database it works as expected and I only get 10 records back:
After a lot of trial and error, finally narrowed it down to the protocol specified in the connect. If using Resp3 it causes the above issue. If I specify Resp2, then it works as expected. I'm not sure if that's a bug or if something else needs to happen to make it work with Resp3, so I'll leave this open for your review. If nothing else, it might be worth noting the setting somewhere in your documentation. Thanks!
so I added a test for this (here - locally, it passes for RESP2 and RESP3; I'm waiting on CI, but are you absolutely sure you're using 1.6.0? previous versions would have failed for this
Fixed at server for next release, including backported: RediSearch/RediSearch#10369 - I literally can't do anything more than that. Sorry you had this problem.
Activity
WEWebTeam commentedon Jun 22, 2026
After a lot of trial and error, finally narrowed it down to the protocol specified in the connect. If using Resp3 it causes the above issue. If I specify Resp2, then it works as expected. I'm not sure if that's a bug or if something else needs to happen to make it work with Resp3, so I'll leave this open for your review. If nothing else, it might be worth noting the setting somewhere in your documentation. Thanks!
mgravell commentedon Jul 3, 2026
Sorry, RESP2 Vs RESP3 has a bunch of annoying deltas. I thought we'd caught them all. Will fix and release ASAP.
mgravell commentedon Jul 6, 2026
so I added a test for this (here - locally, it passes for RESP2 and RESP3; I'm waiting on CI, but are you absolutely sure you're using 1.6.0? previous versions would have failed for this
mgravell commentedon Jul 6, 2026
(From CI) Huh. Well this is going to be fun! Very odd, investigating. Now I need to figure out why it passes locally!
mgravell commentedon Jul 6, 2026
ah, cluster-specific:
Passed Search.SearchTests.TestSearchLimitOffset(endpointId: "standalone") (Resp2) [7 ms]
Passed Search.SearchTests.TestSearchLimitOffset(endpointId: "standalone") (Resp3) [9 ms]
Passed Search.SearchTests.TestSearchLimitOffset(endpointId: "cluster") (Resp2) [14ms]
Failed Search.SearchTests.TestSearchLimitOffset(endpointId: "cluster") (Resp3) [14 ms]
mgravell commentedon Jul 6, 2026
So this appears to be a server bug, not a client bug; reported here: RediSearch/RediSearch#10369
Investigate #508 - FT.SEARCH not applying offset (#513)
mgravell commentedon Jul 7, 2026
While we wait on the modules folks, you can disable RESP3 as via: https://stackexchange.github.io/StackExchange.Redis/Resp3
mgravell commentedon Jul 9, 2026
Fixed at server for next release, including backported: RediSearch/RediSearch#10369 - I literally can't do anything more than that. Sorry you had this problem.
WEWebTeam commentedon Jul 10, 2026
Thanks for tracking it down. I'll check for the server fix.