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

Provide access to raw aggregations #304

Closed
kardeiz opened this issue Feb 5, 2018 · 1 comment
Closed

Provide access to raw aggregations #304

kardeiz opened this issue Feb 5, 2018 · 1 comment

Comments

@kardeiz
Copy link

kardeiz commented Feb 5, 2018

#257 addresses the ability to work with additional aggregation types (I think).

I have a case where I am using cardinality aggs to calculate a count in ES, but this kind of aggregation can't be handled at all in the current system.

Even a simple fn raw_aggs(&self) -> Option<&::serde_json::Value> would be acceptable for the time being.

Also, somewhat off-topic, but what is the rationale for flattening typical "bucket" aggs as is done currently? It seems to break with ES conventions without offering any real benefits (in my opinion/as far as I can tell).

@KodrAus
Copy link
Member

KodrAus commented Feb 5, 2018

Yes, I've been meaning to generalise our support for aggregations. The original use-case was fairly specific for collecting metrics.

I think an aggs_raw method on SearchResponse that returns a Value is something we'll want to have, even in the future API where we'll keep aggs as Values internally.

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

No branches or pull requests

2 participants