This is a meta issue tracks to work to be done for centralising most aggregations in a dedicated module.
The main benefits for centralizing aggregations are:
Building and testing all aggregations is easier and quicker. Server module doesn't need to be build in order to build aggregations. Running something like ./gradlew -p modules/aggregations check will be most of time sufficient to ensure that a change to aggregations is working correctly.
This will make server module more light weight, since it doesn't need to contain many aggregations, but just aggregation infrastructure.
Also aggregations from other modules can be moved to the new aggregation module. But this depends on the license level of these aggregations, whether these aggregations pull in heavy dependencies or require additional security permissions.
When moving an aggregation both production implementation code (builder, aggregator, aggregator factory, bucket representation) should be moved and tests (unit, integration and yaml).
Main tasks
Bucket & metric aggregations
Aggregations that currently exist in server module and can be moved to .modules/aggregations:
[x] Move adjacency_matrix agg to aggregation module. #90294
[x] Move auto_date_histogram agg to aggregation module. #90746
[ ] Move avg agg to aggregation module.
[ ] Move cardinality agg to aggregation module.
[ ] Move composite agg to aggregation module. (#90954)
[ ] Move ctor_cardinality_upper_bound agg to aggregation module.
[ ] Move date_histogram agg to aggregation module.
[ ] Move date_range agg to aggregation module.
[ ] Move diversified_sampler agg to aggregation module.
[ ] Move extended_stats agg to aggregation module.
[ ] Move filter agg to aggregation module.
[ ] Move filters agg to aggregation module.
[ ] Move global agg to aggregation module.
[ ] Move histogram agg to aggregation module.
[ ] Move ip_prefix agg to aggregation module.
[ ] Move ip_range agg to aggregation module.
[ ] Move max agg to aggregation module.
[ ] Move median_absolute_deviation agg to aggregation module. (#92676)
[ ] Move min agg to aggregation module.
[ ] Move missing agg to aggregation module.
[ ] Move nested agg to aggregation module.
[ ] Move percentile_ranks agg to aggregation module.
[ ] Move percentiles agg to aggregation module.
[ ] Move random_sampler agg to aggregation module.
[ ] Move range agg to aggregation module.
[ ] Move rare_terms agg to aggregation module.
[ ] Move reverse_nested agg to aggregation module.
[ ] Move sampler agg to aggregation module.
[ ] Move scripted_metric agg to aggregation module.
[ ] Move significant_terms agg to aggregation module.
[ ] Move significant_text agg to aggregation module.
[ ] Move stats agg to aggregation module.
[ ] Move sum agg to aggregation module.
[ ] Move terms agg to aggregation module.
[x] Move time_series agg to aggregation module. #91356
[ ] Move top_hits agg to aggregation module.
[ ] Move value_count agg to aggregation module.
[ ] Move variable_width_histogram agg to aggregation module.
[ ] Move weighted_avg agg to aggregation module.
Pipeline aggregations
Pipeline aggregations that currently exist in server module and can be moved to .modules/aggregations:
[ ] Move avg_bucket pipeline agg to aggregation module.
[ ] Move bucket_script pipeline agg to aggregation module.
[ ] Move bucket_selector pipeline agg to aggregation module. (#91355)
[x] Move bucket_sort pipeline agg to aggregation module. (#91221)
[ ] Move cumulative_sum pipeline agg to aggregation module.
[x] Move derivative pipeline agg to aggregation module. (#91014)
[ ] Move extended_stats_bucket pipeline agg to aggregation module.
[ ] Move max_bucket pipeline agg to aggregation module.
[ ] Move min_bucket pipeline agg to aggregation module.
[ ] Move moving_avg pipeline agg to aggregation module.
[x] Move moving_fn pipeline agg to aggregation module. (#90836)
[ ] Move percentiles_bucket pipeline agg to aggregation module.
[ ] Move serial_diff pipeline agg to aggregation module.
[ ] Move stats_bucket pipeline agg to aggregation module.
[ ] Move sum_bucket pipeline agg to aggregation module.
Geo aggregations
The geo aggregations should maybe be moved to the existing spatial module or a new module that groups geo aggregations together. This is yet undecided.
[ ] Move geo_bounds agg out of the server module.
[ ] Move geo_centroid agg out of the server module.
[ ] Move geo_distance agg out of the server module.
[ ] Move geohash_grid agg out of the server module.
[ ] Move geotile_grid agg out of the server module.
Other tasks
Other tasks that need completion before closing this meta issue.
[ ] Remove rest-api-spec's dependency on aggs module.
This is a meta issue tracks to work to be done for centralising most aggregations in a dedicated module.
The main benefits for centralizing aggregations are:
./gradlew -p modules/aggregations check
will be most of time sufficient to ensure that a change to aggregations is working correctly.Also aggregations from other modules can be moved to the new aggregation module. But this depends on the license level of these aggregations, whether these aggregations pull in heavy dependencies or require additional security permissions.
When moving an aggregation both production implementation code (builder, aggregator, aggregator factory, bucket representation) should be moved and tests (unit, integration and yaml).
Main tasks
Bucket & metric aggregations
Aggregations that currently exist in server module and can be moved to
.modules/aggregations
:adjacency_matrix
agg to aggregation module. #90294auto_date_histogram
agg to aggregation module. #90746avg
agg to aggregation module.cardinality
agg to aggregation module.composite
agg to aggregation module. (#90954)ctor_cardinality_upper_bound
agg to aggregation module.date_histogram
agg to aggregation module.date_range
agg to aggregation module.diversified_sampler
agg to aggregation module.extended_stats
agg to aggregation module.filter
agg to aggregation module.filters
agg to aggregation module.global
agg to aggregation module.histogram
agg to aggregation module.ip_prefix
agg to aggregation module.ip_range
agg to aggregation module.max
agg to aggregation module.median_absolute_deviation
agg to aggregation module. (#92676)min
agg to aggregation module.missing
agg to aggregation module.nested
agg to aggregation module.percentile_ranks
agg to aggregation module.percentiles
agg to aggregation module.random_sampler
agg to aggregation module.range
agg to aggregation module.rare_terms
agg to aggregation module.reverse_nested
agg to aggregation module.sampler
agg to aggregation module.scripted_metric
agg to aggregation module.significant_terms
agg to aggregation module.significant_text
agg to aggregation module.stats
agg to aggregation module.sum
agg to aggregation module.terms
agg to aggregation module.time_series
agg to aggregation module. #91356top_hits
agg to aggregation module.value_count
agg to aggregation module.variable_width_histogram
agg to aggregation module.weighted_avg
agg to aggregation module.Pipeline aggregations
Pipeline aggregations that currently exist in server module and can be moved to
.modules/aggregations
:avg_bucket
pipeline agg to aggregation module.bucket_script
pipeline agg to aggregation module.bucket_selector
pipeline agg to aggregation module. (#91355)bucket_sort
pipeline agg to aggregation module. (#91221)cumulative_sum
pipeline agg to aggregation module.derivative
pipeline agg to aggregation module. (#91014)extended_stats_bucket
pipeline agg to aggregation module.max_bucket
pipeline agg to aggregation module.min_bucket
pipeline agg to aggregation module.moving_avg
pipeline agg to aggregation module.moving_fn
pipeline agg to aggregation module. (#90836)percentiles_bucket
pipeline agg to aggregation module.serial_diff
pipeline agg to aggregation module.stats_bucket
pipeline agg to aggregation module.sum_bucket
pipeline agg to aggregation module.Geo aggregations
The geo aggregations should maybe be moved to the existing
spatial
module or a new module that groups geo aggregations together. This is yet undecided.geo_bounds
agg out of the server module.geo_centroid
agg out of the server module.geo_distance
agg out of the server module.geohash_grid
agg out of the server module.geotile_grid
agg out of the server module.Other tasks
Other tasks that need completion before closing this meta issue.
rest-api-spec
's dependency on aggs module.