title: Terms failed to parse field size Error when aggregating with two terms in elastic search
body: <p>I want to aggregate on two terms, user and event and I want to fetch count of each event per user. </p>
  
  <p>I have tried following code. But I am getting the error message in second last line that:</p>
  
  <blockquote>
    <p>RequestError: TransportError(400, 'parsing_exception', '[terms]
    failed to parse field [size]')</p>
  </blockquote>
  
  <p>Can you tell me how to solve this.</p>
  
  <pre><code>es.search(index=['ind'],doc_type=['axis'],body={
  "query": {
      "bool": {
          "must": [
              {
                  "range": {
                      "time": {
                          "gt": "10"
                      }
                  }
              }
          ]
      }
  },
  "from": 0,
  "size": 0,
  "aggregations": {
      "user": {
          "aggregations": {
              "event": {
                  "aggregations": {
                      "COUNT(event)": {
                          "value_count": {
                              "field": "event"
                          }
                      }
                  },
                  "terms": {
                      "field": "event",
                      "size": 0
                  }
              }
          },
          "terms": {
              "field": "user",
              "size": 200
          }
      }
  }
  })
  </code></pre>