-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Path hierarchy aggregation #8896
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
Comments
I came across a use case that might be related. I want a tool to help me write IP address blocking rules by examining log records. A rule might be "ban everything from 121.205.*" or perhaps I need to be more selective "ban everything from 121.205.247.*" |
I have made an implementation for this aggregation as a plugin. |
@jpountz this was your idea originally. Do you still think it is worth doing? |
I haven't seen it as much as I initially expected. But I think this can still be interesting indeed. Closing for now, we can re-open in the future if needed. |
Something from the forums - https://discuss.elastic.co/t/aggregation-on-a-materialized-path/36519 |
I'm the author of the forum post, would be neat if you guys can have a look at my problem as it's related to this issue. @clement-tourriere Does your plugin support ES 2.x ? |
Just found out that the plugin does not support ES 2.x: opendatasoft/elasticsearch-aggregation-pathhierarchy#3 (comment) |
Just wondering, any plans to add this type of aggregation? |
Hi all, Thought give you a heads up on searchkit which uses nested aggregations to build a hierarchical tree to filter results from. Check it out here: http://demo.searchkit.co/taxonomy More details can be found here: http://docs.searchkit.co/stable/docs/components/navigation/hierarchical-refinement-filter.html |
I'm late to the party, but some months ago, with the help of @clement-tourriere at jprante/elasticsearch-aggregations#1 it was possible to port the path hierarchy approach to the ES 2.x aggregation framework. With ES 5 now released, I plan to move forward. Please comment at https://github.com/jprante/elasticsearch-aggregations/issues if you have questions about my project or want to contribute. |
Hello, any solutions to get this functionality in 5.x? |
A few users have used nested terms aggregations to try to visualise each level in a tree, such as a file system, eg:
This is very costly as it results in combinatorial explosion. However, because this is a tree, it would be more efficient to store first_level+second_level+third_level in a single field, and to do a single pass over these "leaf buckets". Once we have the most popular leaves, we can backfill the branches (ie first_level+second_level and first_level).
The results would obviously be different to the nested terms agg: instead of having the most popular first_levels, then the most popular second_levels in the most popular first_levels (etc), you'd have the most popular leaves, plus the first_level and second level that those leaves belong to.
A complete example could look like this:
And the result like this:
The text was updated successfully, but these errors were encountered: