We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Discussed briefly with @tsullivan, we can likely combine these requests https://github.com/elastic/kibana/blob/master/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.js#L129
The text was updated successfully, but these errors were encountered:
Pinging @elastic/kibana-app
Sorry, something went wrong.
In the current code, there are 3 queries, which each get job type data for a block of one of 3 time ranges: last 7 days, last 1 day, all time.
We can replace the 3 queries with one that uses a filters aggregation, and it will fetch the same data:
POST /.reporting-*/_search { "size": 0, "aggs": { "date_ranges": { "filters": { "filters": { "last7": { "range": { "created_at": { "gte": "now-7d/d" } } }, "last1": { "range": { "created_at": { "gte": "now-1d/d" } } }, "all": { "match_all": {} } } }, "aggs": { "jobTypes": { "terms": { "field": "jobtype", "size": 3 } }, "objectTypes": { "terms": { "field": "meta.objectType.keyword", "size": 3 } }, "layoutTypes": { "terms": { "field": "meta.layout.keyword", "size": 3 } }, "statusTypes": { "terms": { "field": "status", "size": 4 } } } } } }
PR upcoming: #34327
tsullivan
Successfully merging a pull request may close this issue.
Discussed briefly with @tsullivan, we can likely combine these requests https://github.com/elastic/kibana/blob/master/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.js#L129
The text was updated successfully, but these errors were encountered: