title: How to Use pagination (size and from) in elastic search aggregation?
body: <p>How to Use pagination (size and from) in elasticsearch aggregation , I used Size and from in agreggition it,s throw exception for exmaple.<br>
  I wanna  query like?</p>
  
  <p>GET /index/nameorder/_search</p>
  
  <pre><code>{
      "size": 0,
      "query": {
          "filtered": {
              "query": {
                  "bool": {
                      "must": [
                          {
                              "match": {
                                  "projectId": "10057"
                              }
                          }
                      ]
                  }
              },
              "filter": {
                  "range": {
                      "purchasedDate": {
                          "from": "2012-02-05T00:00:00",
                          "to": "2015-02-11T23:59:59"
                      }
                  }
              }
          }
      },
      "aggs": {
          "group_by_a": {
              "terms": {
                  "field": "promocode",
                  "size": 40,
                  "from": 40
              },
              "aggs": {
                  "TotalPrice": {
                      "sum": {
                          "field": "subtotalPrice"
                      }
                  }
              }
          }
      }
  }
  </code></pre>