[data.search.aggs]: Expression functions for bucket agg types #63762
Labels
Feature:Aggregations
Aggregation infrastructure (AggConfig, esaggs, ...)
Feature:ExpressionLanguage
Interpreter expression language (aka canvas pipeline)
v7.8.0
Part of #61768
As part of improving semantics in the
esaggs
expression function & making it available for more teams to use, we need to try to remove arguments that are blobs of stringified JSON.Instead we will write functions for each of the agg types, as shown in the terms example here, which will only return data of type
agg_type
. Then as a follow-up step, we can updateesaggs
to only accept arguments of typeagg_type
for the agg configs. In this way we can enforce that anyone generating an agg config is doing so using each of these functions, which will make future maintainability much easier and prevent JSON blobs from being stored in expression strings everywhere.Since there are so many agg types, we've broken the work into
buckets
andmetrics
. This issue exists to track work on expression functions for the bucket agg types:date_histogram
histogram
date_range
ip_range
Done in [data.search.aggs]: Create agg types function for terms agg. #63541terms
filter
filters
significant_terms
geo_hash
geo_tile
Steps for each agg type:
id
,enabled
,schema
, andjson
, in addition to the other paramsranges
in therange
agg) would ideally have expression functions created for them too so that they can be passed as subexpression arguments, but as a first step we can also simply stringify those objects in the expression function.AggParamsMapping
intypes.ts
agg_types.ts
and add it togetAggTypesFunctions
The text was updated successfully, but these errors were encountered: