Not able to sort date

https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html
I have been trying to sort my posts on basis of createDate but it does not seem to be working
Index -
"createDate":{
"type":"date",
"format":"dd/MM/yyyy||dd/M/yyyy||d/MM/yyyy||d/M/yyyy"
},

My query is GET /posts/post/_search?q=*
Body -
{
"sort":[{
"createDate":{"order":"desc"}
}]
}

As a response the dates 16/11/2018 and 8/11/2018 are not differentiated by sort in any way and their relative order remains same both in ascending and descending order.

Having a topic title that is a URL doesn't provide any info about what you are asking and is less likely to encourage people to assist you. You may want to edit that.

Thanks done so

Your date formats all look basically the same. Regardless, dates sort according to the timeline, not the formatted version of the dates. Could you provide a large example of some string dates you have, and what order you want them to be in when sorting?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.