diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2014-06-19 13:29:51 +0200 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2014-06-19 13:29:51 +0200 |
commit | a4f8081f89e35bd2ff4bdf471391a4e96f3d3069 (patch) | |
tree | cc1df08066129f10009d27907fbbc0f6b4d32222 /app/handlers/base.py | |
parent | 429ddf4d6bd18ba0cd9bc26ba27a5bf646189ade (diff) |
aggregate: Implement limit keyword.
* Make sure that when we pass limit to an aggregate command
it returns the exact number of matches.
Change-Id: I08a6ce467b24c033b63441544e563a0120f6504a
Diffstat (limited to 'app/handlers/base.py')
-rw-r--r-- | app/handlers/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/handlers/base.py b/app/handlers/base.py index ad9792d..2323244 100644 --- a/app/handlers/base.py +++ b/app/handlers/base.py @@ -325,7 +325,8 @@ class BaseHandler(RequestHandler): if unique: self.log.info("Performing aggregation on %s", unique) return aggregate( - self.collection, unique, sort=sort, fields=fields, match=spec + self.collection, unique, sort=sort, fields=fields, match=spec, + limit=limit ) else: return find_and_count( |