Skip to content

[Star tree] Rounding off date field in Star tree #15265

@bharath-techie

Description

@bharath-techie

Is your feature request related to a problem? Please describe

Since date fields have high cardinality and the aggregation around date such as date histogram operate based on different timeUnit granularities, we need to round off the date fields based on user configured calendar intervals.

Describe the solution you'd like

        "composite": {
            "startree1: {
                "type": "star_tree",
                "config": {
                    "ordered_dimensions": [
                        {
                            "name": "size"
                        }
                    ],
                    "date_dimension": {
                        "name": "date",
                        "calendar_intervals": [
                            "minute",
                            "hour",
                             "day"
                        ]
                    },
                    "metrics": [
                        {
                            "name": "size",
                            "stats": [
                                "sum",
                                "count"
                            ]
                        }
                    ]
                }
            }
        }

User can specify date dimension as above with defaults being 'minute' and 'hour' calendar intervals. User can specify any calendar interval that is provided as part of date histogram query.

The date field ( both milliseconds and nanoseconds resolution ) will get rounded off to the associated calendar interval.
Currently, we don't have support for fixed interval , we can extend the solution if there is a need.

Related component

Indexing:Performance

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions