You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's strange is that I use the same query with different aggregations (aggs) max, min, and avg values work fine. But when I try to use the date_histogram aggregation, this error occurs.
I'd be happy to provide further details where needed or a full request example. Thanks in advance.
The text was updated successfully, but these errors were encountered:
Thank for the example! This is related to #863, there's currently a bug with the serialization of the DateRangeQuery which is affecting queries that include it as well. It will be fixed in the next patch, sorry for the inconvenience.
Java API client version
8.15.0
Java version
21.0.3
Elasticsearch Version
8.15.0
Problem description
Hi there,
I have a query that works perfectly in Elastic 8.13.1, but now I receive the following error:
[es/search] failed: [x_content_parse_exception] [1:391] [bool] failed to parse field [must]
However, when I print my query in the terminal and execute it in the Elastic Dev Tools, it works fine:
{ "query": { "bool": { "must": [ { "range": { "@timestamp": { "gte": "2024-08-13 21:07:00", "lte": "2024-08-16 21:07:00", "format": "yyyy-MM-dd HH:mm:ss" } } }, { "term": { "station_id": {my_station_id} } }, { "nested": { "path": {path}, "query": { "bool": { "must": [ { "exists": { "field": {field} } } ] } } } } ] } }, "size": 0, "aggs": { "station": { "date_histogram": { "field": "@timestamp", "fixed_interval": "1h", "min_doc_count": 1 }, "aggs": { "nested": { "nested": { "path": {path} }, "aggs": { "value": { "avg": { "field": {field} } } } } } } } }
What's strange is that I use the same query with different aggregations (aggs) max, min, and avg values work fine. But when I try to use the date_histogram aggregation, this error occurs.
I'd be happy to provide further details where needed or a full request example. Thanks in advance.
The text was updated successfully, but these errors were encountered: