Skip to content

[Meta] Aggregations Roadmap #60126

@lukeelmers

Description

@lukeelmers

Summary

Kibana's shared aggregations infrastructure lives inside of the data plugin's search service (plugins.data.search.aggs), and is owned by @elastic/kibana-app-arch. This infrastructure exists to provide a way of modeling aggregations for use in a UI, and then converting them to Elasticsearch DSL. An example of a consumer of this service is the default visualizations editor, which provides the UI for configuring most of Kibana's core visualizations.

The aggs service also works in conjunction with SearchSource, allowing consumers to push their modeled agg (AggConfig) to SearchSource, and have it automatically converted to DSL for them when a query is executed.

The main components of the aggs service are:

  1. Classes to model each of the different ES aggregations (AggTypes) supported in Kibana, and the different params they accept as configuration.
  2. A types registry which exposes each of the available agg types to applications.
  3. A static AggConfig class, which is a model representing an individual aggregation, including its type, & params used to configure that type.
  4. A createAggConfigs method, which allows you to create a collection of AggConfigs that can ultimately be configured and sent to Elasticsearch.

This meta issue exists to track ongoing planned work for this service. For an overview of currently supported aggs in Kibana, please refer to the Kibana ES aggs support meta issue.

Remaining migration tasks

Refactoring

  • Remove createFilter from agg types and instead have each agg return values for the filter
    • For ranges this should be straightforward; have a method to return from and to for a given agg
    • Terms agg which also uses createFilter is more complex and would require further discussion
  • Expression functions for object-based agg params
  • Unify configStates interface with the AggConfig.toJSON() output
  • Clean up AggConfig

Features & Enhancements

General

esaggs

Agg-specific features

Bucket
Metrics
Matrix
  • Matrix Stats*
Pipeline

* potential low-hanging fruit

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:AggregationsAggregation infrastructure (AggConfig, esaggs, ...)Metaimpact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.loe:smallSmall Level of Effort

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions