In Marketplace we have a special paginator that looks at the total count returned in the ES response and use it for the Django paginator (vs doing 2 queries -- a count query then the real query). This might be a useful thing to include in elasticutils.
In Marketplace we have a special paginator that looks at the total count returned in the ES response and use it for the Django paginator (vs doing 2 queries -- a count query then the real query). This might be a useful thing to include in elasticutils.
Update: Our pagination class is now here: https://github.com/mozilla/zamboni/blob/master/mkt/api/paginator.py