Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support minimum value in cardinality aggregation #6419

Closed
loren opened this issue Jun 5, 2014 · 1 comment
Closed

Support minimum value in cardinality aggregation #6419

loren opened this issue Jun 5, 2014 · 1 comment

Comments

@loren
Copy link

loren commented Jun 5, 2014

Initially suggested at http://elasticsearch-users.115913.n3.nabble.com/filtering-avec-cardinality-td4055450.html

Something like:

         "aggregations": {
                "agg_distinct_ip":{
                    "cardinality": {
                        "field" : "ip_client",
                        "min_value": 5 
                    },
                },
            }
@jpountz
Copy link
Contributor

jpountz commented Nov 17, 2014

This is something that could not be addressed at the shard level since we would need to know how many unique ips a particular term got on other shards in order to decide on whether or not to include a term. So this could only happen during the reduce phase and could be addressed by #8110 .

But I think a better way to address your needs might be to sort terms based on the value returned by the cardinality aggregation in order to get users who have the highest number of unique ips first? http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-order

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants