good afternoon,
I am making a query from php to elasticsearch,
I give you some parameters
$params = [
'scroll' => '30s', // how long between scroll requests. should be small!
'size' => 300, // how many results per shard you want back
'index' => $module,
'_source' => $return_values,
'body' => [
'query' => [
"bool" => [
"must" => [
[
'range' => [
'fecha_inicio' => [
"lt" => $fecha_inicio
]
]
],
[
'range' => [
'fecha_fin' => [
"lte" => $fecha_fin,
"gte" => $fecha_inicio
]
]
],
]
]
]
],
];
but when I do the query it returns values that are not within the range that I put.
I had also put "format" => "yyyy-MM-dd", since the date I sent you has that format, and the fecha_inicio mapping in elastichsearch
"fecha_inicio": {
"type": "date",
"format": "yyyy-MM-DD"
},
"fecha_fin": {
"type": "date",
"format": "yyyy-MM-DD"
},
I dont know what happen for the elasticsearch dont send me the correct information