Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bharath-techie opened this issue Aug 15, 2024 · 0 comments · Fixed by #15249
Closed

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

bharath-techie opened this issue Aug 15, 2024 · 0 comments · Fixed by #15249
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Indexing:Performance

Comments

@bharath-techie
Copy link
Contributor

bharath-techie commented Aug 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Indexing:Performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant