summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordvora-h <67596500+dvora-h@users.noreply.github.com>2022-09-29 13:51:37 +0300
committerGitHub <noreply@github.com>2022-09-29 13:51:37 +0300
commitfbf68dd217b4bf7d91a0e07ca73c8a39dfbc1066 (patch)
treee308f61648599809a9fe26ac43abc124569d92b2
parent7ee76a8db657019f7c856bee927fd79d8debebc7 (diff)
downloadredis-py-fbf68dd217b4bf7d91a0e07ca73c8a39dfbc1066.tar.gz
Fix - aggregation request arguments for LIMIT (#2393)
Co-authored-by: Chayim <chayim@users.noreply.github.com>
-rw-r--r--redis/commands/search/aggregation.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/redis/commands/search/aggregation.py b/redis/commands/search/aggregation.py
index 061e69c..a171fa1 100644
--- a/redis/commands/search/aggregation.py
+++ b/redis/commands/search/aggregation.py
@@ -104,7 +104,6 @@ class AggregateRequest:
self._aggregateplan = []
self._loadfields = []
self._loadall = False
- self._limit = Limit()
self._max = 0
self._with_schema = False
self._verbatim = False
@@ -211,7 +210,8 @@ class AggregateRequest:
`sort_by()` instead.
"""
- self._limit = Limit(offset, num)
+ _limit = Limit(offset, num)
+ self._aggregateplan.extend(_limit.build_args())
return self
def sort_by(self, *fields, **kwargs):
@@ -323,8 +323,6 @@ class AggregateRequest:
ret.extend(self._aggregateplan)
- ret += self._limit.build_args()
-
return ret