I have a query, where someDate
is of type date. I don't have control over mapping while creating an index. I wanted to get the value in millis for the following query. Is there a way to do that in ES (via API)
GET /myindex/_search
{
"size": 1,
"sort": [
{ "someDate": {"order": "asc"},
"format": "epoch_millis" // this does not seem to be supported in ES 5.4
}
]
}
The actual response looks like this:
"SomeDate": "2017-08-01T01:07:04.000Z"
I would like to get the following response
"SomeDate": 1501636024000