Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPipeline aggregations: Ability to perform computations on aggregations #10568
Conversation
colings86
and others
added some commits
Feb 11, 2015
jpountz
reviewed
Apr 24, 2015
| + " must reference either a number value or a single value numeric metric aggregation"); | ||
| } | ||
| // doc count never has missing values so gap policy doesn't apply here | ||
| boolean isDocCountProperty = aggPathAsList.size() == 1 && "_count".equals(aggPathAsList.get(0)); |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpountz
Apr 24, 2015
Contributor
Should it be aggPathAsList.get(aggPathAsList.size() - 1).equals("_count") ?
jpountz
Apr 24, 2015
Contributor
Should it be aggPathAsList.get(aggPathAsList.size() - 1).equals("_count") ?
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
colings86
Apr 27, 2015
Member
Not sure it matters? If the whole path is _count then it will work as is, and you can't get deeper buckets if there is a doc count of 0 in the top level anyway?
colings86
Apr 27, 2015
Member
Not sure it matters? If the whole path is _count then it will work as is, and you can't get deeper buckets if there is a doc count of 0 in the top level anyway?
jpountz
reviewed
Apr 24, 2015
| } | ||
| } | ||
| } catch (InvalidAggregationPathException e) { | ||
| return null; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
colings86
Apr 27, 2015
Member
Should we add a debug log here then? it still needs to return null as a bucket may not have an entry for a particular aggregation name
colings86
Apr 27, 2015
Member
Should we add a debug log here then? it still needs to return null as a bucket may not have an entry for a particular aggregation name
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpountz
Apr 24, 2015
Contributor
I like the fact that it's not too invasive and makes efforts to not have side-effects on other aggs by copying the agg trees instead of modifying them in-place.
Most of my comments are cosmetics, in particular there are lots of indentation issues in aggregator constructor and anonymous LeafCollector definitions.
Regarding documentation, I think we need to move general informations to the main page about aggs/reducers instead of having it scattered across individual reducers/aggs.
|
I like the fact that it's not too invasive and makes efforts to not have side-effects on other aggs by copying the agg trees instead of modifying them in-place. Most of my comments are cosmetics, in particular there are lots of indentation issues in aggregator constructor and anonymous LeafCollector definitions. Regarding documentation, I think we need to move general informations to the main page about aggs/reducers instead of having it scattered across individual reducers/aggs. |
polyfractal
and others
added some commits
Apr 25, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
colings86
Apr 29, 2015
Member
@jpountz I pushed an update and replied to some of your comments. Any chance you could have another look?
|
@jpountz I pushed an update and replied to some of your comments. Any chance you could have another look? |
jpountz
added some commits
Apr 29, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpountz
Apr 29, 2015
Contributor
It looks to me like there are still some open TODOs about documentation but other than that LGTM. I pushed commits for some indentation issues I found.
|
It looks to me like there are still some open TODOs about documentation but other than that LGTM. I pushed commits for some indentation issues I found. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
polyfractal
Apr 29, 2015
Member
I'm working on the larger doc TODOs (e.g. centralize docs about _count, buckets_path and path syntax, gap_policy, etc). I don't think it should block merging this though, especially since I'm restructuring part of the aggs docs as a whole and want some eyeballs...don't want to hold up this PR.
|
I'm working on the larger doc TODOs (e.g. centralize docs about |
colings86 commentedApr 13, 2015
Adds a new type of aggregation called 'reducers' which act on the output of aggregations and compute extra information that they add to the aggregation tree. Reducers look much like any other aggregation in the request but have a
buckets_pathparameter which references the aggregation(s) to use.Internally there are two types of reducer; the first is given the output of its parent aggregation and computes new aggregations to add to the buckets of its parent, and the second (a specialisation of the first) is given a sibling aggregation and outputs an aggregation to be a sibling at the same level as that aggregation.
This PR includes the framework for the reducers, the derivative reducer (#9293), the moving average reducer(#10002) and the maximum bucket reducer(#10000). These reducer implementations are not all yet fully complete.
Known work left to do (these points will be done once this PR is merged into the master branch):
Contributes to #9876, #10002, #9293, and #10000