Skip to content

Use JSONPath syntax for aggregation paths #8434

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

Closed
colings86 opened this issue Nov 11, 2014 · 3 comments
Closed

Use JSONPath syntax for aggregation paths #8434

colings86 opened this issue Nov 11, 2014 · 3 comments
Assignees

Comments

@colings86
Copy link
Contributor

@jpountz pointed out that we could use JSONPath to define paths to properties in aggregations. This would be a new syntax and would replace the old a>b.c style syntax. We could add a config option to enable the older syntax for bwc. The new syntax would allow for complex aggregation paths for use in reducers to, for example, get properties from a particular bucket in an aggregation, or retrieve all the values of the property c in all the buckets even if c is three levels down the aggregation tree. It would also give a standard way to access the root of the agg tree (with '$').

for reference see: http://goessner.net/articles/JsonPath/

@colings86
Copy link
Contributor Author

After looking at JSONPath it's not 100% good fit for aggregation paths and there are other efforts looking at JSONPath-like functionality elsewhere in the product, so closing this for now

@thomax
Copy link

thomax commented Aug 11, 2015

After looking at JSONPath it's not 100% good fit for aggregation paths and there are other efforts looking at JSONPath-like functionality elsewhere in the product, so closing this for now

Have any of these other efforts given results? JSONPath or JSONPath-like functionality would be useful to me, so I'd be very interested to hear about this.

@colings86
Copy link
Contributor Author

So far just response filtering has been implemented (https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#_response_filtering) which uses a simplified syntax for referencing paths in JSON.

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

3 participants