[Maps] add Top term aggregation#57875
Conversation
|
Pinging @elastic/kibana-gis (Team:Geo) |
thomasneirynck
left a comment
There was a problem hiding this comment.
So sweet getting these additional new features dialed in. It really matures the feature-set tremendously.
x-pack/legacy/plugins/maps/public/layers/sources/es_term_source.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/layers/styles/vector/properties/dynamic_style_property.js
Outdated
Show resolved
Hide resolved
| async getGeoJsonWithMeta(layerName, searchFilters, registerCancelCallback) { | ||
| const indexPattern = await this.getIndexPattern(); | ||
| const searchSource = await this._makeSearchSource(searchFilters, 0); | ||
| const aggConfigs = new AggConfigs( |
There was a problem hiding this comment.
+1 getting rid of agg-configs.
Probably can remove corresponding mock as well:
cc @aaronjcaldwell I think we're only down to usage for bounds-agg after this.
We could probably remove in similar fashion|
@elasticmachine merge upstream |
|
Thanks for investigating the composite agg. I would be hesitant to replace the existing implementation.
I would only create a composite-aggs, if a top-terms is present in the metric-config. It seems like the most conservative choice. It would prevent us from pre-emptively fixing an issue that has not been raised, but still allow us to introduce the top-terms functionality more generically instead of limiting it to just using it in blended-layers. Later, we can always still remove the default implementation if using composite-aggs did not introduce any unintended consequences. |
I have added a separate path for when there are no term sub-aggregations. |
x-pack/legacy/plugins/maps/public/layers/sources/es_pew_pew_source/convert_to_lines.test.js
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/geo_tile_utils.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/convert_to_geojson.test.js
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/es_geo_grid_source.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/es_geo_grid_source.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/geo_tile_utils.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/layers/styles/vector/properties/dynamic_style_property.js
Show resolved
Hide resolved
thomasneirynck
left a comment
There was a problem hiding this comment.
Some small cleanup suggestions. Can you create a follow-up ticket for the getMetrics issue?
x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/es_geo_grid_source.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/es_geo_grid_source.js
Outdated
Show resolved
Hide resolved
Created #58560 |
thomasneirynck
left a comment
There was a problem hiding this comment.
One small comment left-over. Thanks, great functionality. not only to make blended-layers work, but also as stand-alone!
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* [Maps] add Top term aggregation * update pew-pew source to handle terms agg * make helper function for pulling values from bucket * update terms source * better join labels * categoricla meta * remove unused constant * remove unused changes * remove unused constant METRIC_SCHEMA_CONFIG * update jest expect * fix auto complete suggestions for top term * get category autocomplete working with style props from joins * pluck categorical style meta with real field name * mock MetricsEditor to fix jest test * review feedback * es_agg_utils.js to es_agg_utils.ts * typing updates * use composit agg to avoid search.buckets limit * i18n update and functional test fix * stop paging through results when request is aborted * remove unused file * do not use composite agg when no terms sub-aggregations * clean up * pass indexPattern to getValueAggsDsl * review feedback * more review feedback * ts-ignore for untyped imports in tests * more review feedback * add bucket.hasOwnProperty check Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Maps] add Top term aggregation * update pew-pew source to handle terms agg * make helper function for pulling values from bucket * update terms source * better join labels * categoricla meta * remove unused constant * remove unused changes * remove unused constant METRIC_SCHEMA_CONFIG * update jest expect * fix auto complete suggestions for top term * get category autocomplete working with style props from joins * pluck categorical style meta with real field name * mock MetricsEditor to fix jest test * review feedback * es_agg_utils.js to es_agg_utils.ts * typing updates * use composit agg to avoid search.buckets limit * i18n update and functional test fix * stop paging through results when request is aborted * remove unused file * do not use composite agg when no terms sub-aggregations * clean up * pass indexPattern to getValueAggsDsl * review feedback * more review feedback * ts-ignore for untyped imports in tests * more review feedback * add bucket.hasOwnProperty check Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Closes #11223
This PR adds
Termsaggregation to aggregation selection list. This allows users to create maps with clusters and joins that can be styled by top term.This feature is required for blended layer. This will allow clusters in blended layer to have roll-up style when documents are styled by category.