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
Refactoring of Aggregations #14136
Refactoring of Aggregations #14136
Conversation
@@ -150,15 +144,29 @@ public Builder addPipelineAggregator(PipelineAggregatorFactory pipelineAggregato | |||
return this; | |||
} | |||
|
|||
/** | |||
* FOR TESTING ONLY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can it be pkg-private then?
Things look good. Can you just explain why we need this new "init" phase? |
fe4875b
to
62c387f
Compare
@jpountz I pushed a some updates. could you re-review? As to the "init" phase, this is needed to be able to run things that used to be done in the constructor but now can't be because:
I thought it was neater to have an "init" phase than to duplicate calls to initialise in the different create() methods |
4a4be91
to
4ffd006
Compare
# Conflicts: # core/src/main/java/org/elasticsearch/percolator/PercolateContext.java # core/src/main/java/org/elasticsearch/search/aggregations/bucket/filter/FilterParser.java # core/src/main/java/org/elasticsearch/search/aggregations/bucket/filters/FiltersParser.java # core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsParametersParser.java # core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java # core/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridParserTests.java # test/framework/src/main/java/org/elasticsearch/test/TestSearchContext.java
…om createInternal() parameters
Also renames all the implementations appropriately
# Conflicts: # core/src/main/java/org/elasticsearch/search/SearchService.java # test/framework/src/main/java/org/elasticsearch/search/MockSearchService.java
@@ -51,7 +52,8 @@ | |||
private List<SortBuilder> sorts; | |||
private Boolean trackScores; | |||
private HighlightBuilder highlightBuilder; | |||
private List<AbstractAggregationBuilder> aggregations; | |||
private List<AggregatorBuilder<?>> aggregationFactorys; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Factory/Builder/ ?
I gave a quick look and could spot a few indentation and naming inconsistencies. Otherwise it looks good! |
# Conflicts: # core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java
This PR refactors all aggregations to be able to be parsed on the coordinating node and serialised as Objects to the shards.