SORT BY DATE issues, the results are NOT SORTED, OUT OF ORDER


(Michael Lan) #1

This is a simple SORT BY DATE query.
The mapping is
...
"publish_date": {
"type": "date",
"format": "yyyy-MM-dd HH:mm"
}
...
The query is
...
"sort": [
{
"publish_date": {
"order": "desc"
}
}
]
...
It works fine on staging environment, but OUT OF ORDER on production environment.
On staging, each "hits" has a field like this
"sort" : [ 1404906600000 ]
I think this is the time in millisecond.

But on production, each "hits" has a field like this
"sort" : [ "\\b" ]
And the results are OUT OF ORDER

Anybody help me?


(Michael Lan) #2

"sort" : [ "\\b" ]
looks like a regular expression "Word Boundaries".


(system) #3