Is it possible to sort by "date_range" field?
If yes, how?
Mapping:
PUT testindex
{
"mappings": {
"datetest": {
"properties": {
"created": {
"type": "date"
},
"id": {
"type": "keyword"
},
"Name": {
"type": "keyword"
},
"dater": {
"type": "date_range"
}
}
}
}
}
query:
GET /testindex/_search
{
"query": {
"match_all": {}
},
"sort": [
{
"dater": {
"order": "desc"
}
}
]
}
result:
error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Fielddata is not supported on field [dater] of type [date_range]"
}
]
}
thank you very much