>
> I think I figured it out. Each aggs sections sub divides the data. First 
> aggs buckets all the nested docs. Second aggs restricts the bucket to a 
> filter. Third aggs run the terms facet on it. 
>

 "aggs": {
    "foo": {
      "nested": {
        "path": "rdata"
      },
      "aggs": {
        "bar": {
          "filter": {
            "term": {
              "rdata.mapid": 37
            }
          },
          "aggs": {
            "foobar": {
              "terms": {
                "field": "rdata.value",
                "size": 28654,
                "order": {
                  "_count": "desc"
                }
              }
            }
          }
        }
      }
    }
  } 

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/e0b49cd3-95c9-4060-851a-739073140ea4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to