Field collapsing is coming in a future version of ES. For now, you can use 
a terms facet and the all_terms option:

{
    "query" : {
        "match_all" : {  }
    },
    "facets" : {
        "tag" : {
            "terms" : {
                "field" : "distinctid",
                "all_terms" : true
            }
        }
    }
}


And then in the result, just count the total number of entries in the terms 
array.

-- 
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/7aafecc3-2f7f-4537-a5c2-c7fd38c4b2b6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to