summaryrefslogtreecommitdiff
path: root/redis/commands/search/aggregation.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/commands/search/aggregation.py')
-rw-r--r--redis/commands/search/aggregation.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/redis/commands/search/aggregation.py b/redis/commands/search/aggregation.py
index a171fa1..93a3d92 100644
--- a/redis/commands/search/aggregation.py
+++ b/redis/commands/search/aggregation.py
@@ -108,6 +108,7 @@ class AggregateRequest:
self._with_schema = False
self._verbatim = False
self._cursor = []
+ self._dialect = None
def load(self, *fields):
"""
@@ -321,10 +322,22 @@ class AggregateRequest:
ret.append(str(len(self._loadfields)))
ret.extend(self._loadfields)
+ if self._dialect:
+ ret.extend(["DIALECT", self._dialect])
+
ret.extend(self._aggregateplan)
return ret
+ def dialect(self, dialect):
+ """
+ Add a dialect field to the aggregate command.
+
+ - **dialect** - dialect version to execute the query under
+ """
+ self._dialect = dialect
+ return self
+
class Cursor:
def __init__(self, cid):