Skip to content

[Star tree] Handle 'count', 'avg' metric and default metrics in star tree mapper #15148

@bharath-techie

Description

@bharath-techie

Is your feature request related to a problem? Please describe

  • Since all aggregation results has 'doc_count' as part response, star tree will require 'value_count' for all metric fields specified as part of star tree mapping
  • When user specifies 'avg' metric, we need 'value_count' and 'sum' metric for the metric fields so that we can derive avg
  • Set default metrics to be 'sum', 'value_count' and by extension 'avg' since it can be derived based on sum and count.
  • Rename 'count' to 'value_count' in star tree mapping

Describe the solution you'd like

  • Auto-add 'value_count' for all metric fields specified as part of star tree mapping
  • To handle 'avg' metric, automatically add 'sum' metric to metric field so that we can compute during query time via 'sum/value_count'
  • Set default metrics to be 'sum', 'value_count' and by extension 'avg' since it can be derived based on sum and count. Keeping it minimal since performance and storage size increases per every metric.
  • Rename 'count' to 'value_count' in star tree flows to be inline with search aggregations

Related component

Indexing:Performance

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions