Hello,
I use:
Configurated search query:
array(2) {
["index"]=>
string(19) "my_index_*"
["body"]=>
array(4) {
["query"]=>
array(1) {
["range"]=>
array(1) {
["data.main.startDateTime"]=>
array(2) {
["lte"]=>
string(25) "2008-08-23T23:05:10"
["gte"]=>
string(25) "2008-08-23T23:05:08+02:00"
}
}
}
["sort"]=>
array(1) {
[0]=>
array(1) {
["data.main.startDateTime"]=>
array(1) {
["order"]=>
string(4) "desc"
}
}
}
["from"]=>
int(0)
["size"]=>
int(100)
}
}
Calling the search-Request (Elasticsearch\Client->search($params)
with the parameters above returns also records out of the range. Seems the range are ignored....
Expected 2 hits
Actual more than 10 hits
As example the query returns this record, which is out of the range
// the record
{
"_index": "my_index_200808",
"_type": "_doc",
...
"_version": 1,
"_seq_no": 34,
"_primary_term": 1,
"found": true,
"_source": {
...,
"data": {
"main": {
...
"startDateTime": "2008-08-23T23:25:22+02:00",
...
},
...
}
}
}
What is wrong with the query configuration? How to use the range query?