title: elasticsearch filter aggs by doc count
body: <p>I have a query that counts the number of images per user:</p>
  
  <pre><code>GET images/_search
  {
   "query": {
      "bool": {
        "must": [
        {
          "term": {
             "appID.raw": "myApp"
        }
      }
    ]
   }
  },
  "size": 0,
  "aggs": {
    "perDeviceAggregation": {
      "terms": {
         "field": "deviceID"    
      }
    }
   }
  }
  </code></pre>
  
  <p>It basically works fine, but I would like to exclude all aggregation results for users that have less than 200 images. How can I tweak the query above to achieve this?</p>
  
  <p>Thanks.</p>