aparo / pyes

Python connector for ElasticSearch - the pythonic way to use ElasticSearch
BSD 3-Clause "New" or "Revised" License
607 stars 270 forks source link

Added Cardinality Aggregations #494

Closed vadimio closed 8 years ago

vadimio commented 9 years ago

Seems like a missing functionality. Only one parameter exists, that is precision_threshold. A very simple aggregation. One of the uses is to approximate number of unique values in a set GET /index-name/vote/_search { "size": 0, "aggs" : { "unique_users" : { "cardinality" : { "field" : "user_id" } } } }