I'm using the official PHP client from here - https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html
Everything works fine but one thing - filter by date range; The field type in mapping is Date, but I do not getting filtered result. Query structure looks like this and it works fine when I'm executing in Sense chrome plugin:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"range": {
"myfield": {
"gt": "2015-01-10"
}
}
}
}
}
}
mapping for field:
"myfield": {
"type": "date",
"format": "dateOptionalTime"
}
In php client I've tried to check range filter with another field which is not datetype and it works fine, the only problem with datetype fields.
Thanks.