Hello,
I have a field "price" which is a double, and a field "insert_date" which is a datetime field. When I do a range search on the price field all works fine, same goed for the insert_date. But when I do a combined range search on both of then with the settings below I get an error.
bool: {
must: [
{
range: {
price: [
{
gte: "200"
},
{
lt: "600"
}
],
insert_date: [
{
gte: "2016-09-13 05:01:14"
}
]
}
}
]
}
The error that i get is:
Fatal error: Uncaught Elasticsearch\Common\Exceptions\BadRequest400Exception: {"error":{"root_cause":[{"type":"parse_exception","reason":"failed to parse date field [600] with format [yyyy-MM-dd HH:mm:ss]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"init_scan","grouped":true,"failed_shards":[{"shard":0,"index":"data_standard_13_6_nl_test","node":"w115E6KmTiuBeW7RmJ_feQ","reason":{"type":"parse_exception","reason":"failed to parse date field [600] with format [yyyy-MM-dd HH:mm:ss]","caused_by":{"type":"illegal_argument_exception","reason":"Invalid format: \"600\" is too short"}}}]},"status":400}