ERROR [2023-08-07 17:18:11,656] fk.sp.fulfilment.apollo.common.exceptions.TemplateException: Runtime exception caught! Failed to execute phase [query], all shards failed; shardFailures {[TuXIUIUtSG2nBgh7WkrgkQ][shipment_actionable_v2][57]: RemoteTransportException[[10.52.103.228][10.52.103.228:9300][indices:data/read/search[phase/query]]]; nested: ElasticsearchParseException[failed to parse date field [1682-12-06T01:31:43.000+05:53:28] with format [dateTime]: [failed to parse date field [1682-12-06T01:31:43.000+05:53:28] with format [dateTime]]]; nested: IllegalArgumentException[failed to parse date field [1682-12-06T01:31:43.000+05:53:28] with format [dateTime]]; nested: NotSerializableExceptionWrapper[date_time_parse_exception: Failed to parse with all enclosed parsers]; }
上下文:
{
"params": {
"dispatch_tiers": ["REGULAR", "EXPRESS"],
"seller_id": "7052a23b7cbe4f36",
"location_id": "LOC65e341d6660f443c8dc5ffd085d5740b",
"order_date": {
"from": "1682-12-06T01:31:43.000+05:30",
"to": "2023-08-07T06:46:49.000+05:30"
},
// Other parameters
},
// Other sections of the template
}
response = new SearchTemplateRequestBuilder(client) .setRequest(searchRequest) .setScript(templateName) .setScriptType(ScriptType.STORED) .setScriptParams(params) .get() .getResponse();
While running the ES query we are getting the response with dateTime format, but when using this template with api, it giving the issue.
{ "range": { "units.order_date": { "from": "1682-12-06T01:31:43.000+05:53:28", "to": "2023-08-07T06:46:49.000+05:30", "include_lower": true, "include_upper": true } }
在模板中执行Elasticsearch查询的过程中,我获得了一个dateTime格式的响应。然而,当此模板与API请求结合使用时,上述错误就会出现。
1条答案
按热度按时间7ajki6be1#
正如我所评论的,这是在
from
日期中传递的时区值的问题。应该是1682-12-06T01:31:43.000+05:30
而不是1682-12-06T01:31:43.000+05:53:28
。在日期结束时应该是
+05:30
。