1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

use limit when limitoffset is zero (#3275)

This commit is contained in:
Nedyalko Dyakov
2025-02-14 13:07:39 +02:00
committed by GitHub
parent 9db1286414
commit 196fc9b21a
2 changed files with 9 additions and 10 deletions

View File

@ -616,6 +616,11 @@ var _ = Describe("RediSearch commands Resp 2", Label("search"), func() {
res, err = client.FTAggregateWithArgs(ctx, "idx1", "*", options).Result()
Expect(err).NotTo(HaveOccurred())
Expect(res.Rows[0].Fields["t1"]).To(BeEquivalentTo("b"))
options = &redis.FTAggregateOptions{SortBy: []redis.FTAggregateSortBy{{FieldName: "@t1"}}, Limit: 1, LimitOffset: 0}
res, err = client.FTAggregateWithArgs(ctx, "idx1", "*", options).Result()
Expect(err).NotTo(HaveOccurred())
Expect(res.Rows[0].Fields["t1"]).To(BeEquivalentTo("a"))
})
It("should FTAggregate load ", Label("search", "ftaggregate"), func() {