Skip to content

Commit fbf68dd

Browse files
dvora-hchayim
andauthored
Fix - aggregation request arguments for LIMIT (#2393)
Co-authored-by: Chayim <[email protected]>
1 parent 7ee76a8 commit fbf68dd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

redis/commands/search/aggregation.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def __init__(self, query="*"):
104104
self._aggregateplan = []
105105
self._loadfields = []
106106
self._loadall = False
107-
self._limit = Limit()
108107
self._max = 0
109108
self._with_schema = False
110109
self._verbatim = False
@@ -211,7 +210,8 @@ def limit(self, offset, num):
211210
`sort_by()` instead.
212211
213212
"""
214-
self._limit = Limit(offset, num)
213+
_limit = Limit(offset, num)
214+
self._aggregateplan.extend(_limit.build_args())
215215
return self
216216

217217
def sort_by(self, *fields, **kwargs):
@@ -323,8 +323,6 @@ def build_args(self):
323323

324324
ret.extend(self._aggregateplan)
325325

326-
ret += self._limit.build_args()
327-
328326
return ret
329327

330328

0 commit comments

Comments
 (0)