elasticsearch/elasticsearch — pull request #7497 by jpountz (2014-08-28 10:36:58+00:00)
Title: Aggregations: fix behavior when used in conjunction with scroll or scan

Aggregations are collection-wide statistics over one or several indices so:
- `scan` should not be allowed to use aggregations since it never collects all documents at once,
- `scroll` should only return aggregations on the first page (see #1642)