We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi there, would be nice to add examples for the following:
And for bucket aggregation: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html can this be combined with cardinality for each bucket?
Cheers.
The text was updated successfully, but these errors were encountered:
Hi @priamai ,
Here are some examples:
from pandagg import Search # valuecount agg > Search().agg('test_value_count', 'value_count', field='rootFields') { "aggs": { "test_value_count": { "value_count": { "field": "rootFields" } } } } # cardinality > Search().agg('test_value_count', 'cardinality', field='rootFields') { "aggs": { "test_value_count": { "cardinality": { "field": "rootFields" } } } } # group by terms aggregation, with cardinality per bucket > Search().groupby('entiy type', 'terms', field='ruleEntityType').agg('cardinality count', 'cardinality', field='rootFields') { "aggs": { "entiy type": { "terms": { "field": "ruleEntityType" }, "aggs": { "cardinality count": { "cardinality": { "field": "rootFields" } } } } } }
Using the discover helper (on a testing index):
discover
> from elasticsearch import Elasticsearch > from pandagg.discovery import discover > client = Elasticsearch(hosts=[<your_host>]) > indices = discover(client) > vr = indices.validation_rule_02 > vr.search().agg('test_value_count', 'value_count', field='rootFields') test_value_count NaN 8674 > vr.search().agg('test_value_count', 'cardinality', field='rootFields') test_value_count NaN 795 > vr.search().groupby('entiy type', 'terms', field='ruleEntityType').agg('cardinality count', 'cardinality', field='rootFields') doc_count cardinality count entiy type 0 6353 722 2 813 64 4 238 51 1 222 54 10 71 13 13 56 26 6 40 7 3 35 10 7 29 2 11 25 8
Hope it helps
Cheers
Sorry, something went wrong.
@priamai FYI you might have to upgrade to last version v0.2.1 (https://github.com/alkemics/pandagg/releases/tag/v0.2.1)
It was working already but yes will upgrade for sure. Thanks!
No branches or pull requests
Hi there,
would be nice to add examples for the following:
And for bucket aggregation:
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html
can this be combined with cardinality for each bucket?
Cheers.
The text was updated successfully, but these errors were encountered: