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] [Search] Date histogram with metric aggregation #16552

Open
sandeshkr419 opened this issue Nov 4, 2024 · 1 comment
Open

[Star Tree] [Search] Date histogram with metric aggregation #16552

sandeshkr419 opened this issue Nov 4, 2024 · 1 comment
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Search:Aggregations

Comments

@sandeshkr419
Copy link
Contributor

sandeshkr419 commented Nov 4, 2024

Is your feature request related to a problem? Please describe

This is to support date histogram aggregations with metric aggregations.

Example query shape:

{
    "size": 0,
    "aggs": {
        "by_hour": {
            "date_histogram": {
                "field": "@timestamp",
                "calendar_interval": "hour"
            }, "aggs": {
                "sum_status": {
                    "sum": {
                        "field": "status"
                    }
                }
            }
        }
    }
}

Describe the solution you'd like

Vanilla date histograms aggregations with no metric aggregations are already optimized and would most likely not benefit from star-tree optimization. Its specifically where metric aggregations (sum, min, max, avg) are required, those cases would gain performance benefits.

Related component

Search:Aggregations

Describe alternatives you've considered

No response

Additional context

No response

@sandeshkr419
Copy link
Contributor Author

@msfroh - did some brainstorming on how to resolve nested aggregations effectively with @bharath-techie and came up with this design draft PR where I use a wrapper over LeafBucketCollector to resolve nested aggregations.

Considered other approaches where I tried to resolve it without a wrapper, but figuring out how to assign buckets of sub-aggregations seemed tricky.

Please let me know your initial thoughts on the draft PR (please ignore the hard-coding for now). Need comments specifically on assigning values to buckets of sub-aggregators.

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 Search:Aggregations
Projects
Status: In Progress
Status: 🆕 New
Development

No branches or pull requests

1 participant