elasticsearch/elasticsearch — pull request #2004 by drewr (2012-06-06 20:23:38+00:00)
Title: Don't require lowercase sort order

Currently this will not return 3... 2... 1...

#!/bin/sh

curl -s -XDELETE localhost:9200/test >/dev/null

curl -s -XPUT localhost:9200/test/t/uno -d '{"wat": 1}'; echo

curl -s -XPUT localhost:9200/test/t/dos -d '{"wat": 2}'; echo

curl -s -XPUT localhost:9200/test/t/tres -d '{"wat": 3}'; echo

curl -s -XPOST localhost:9200/test/_refresh\?pretty=1; echo

curl -s localhost:9200/test/_search\?pretty=1 -d '
{
"query": {
"match_all": {}
},
"sort": [
{
"wat": {
"order": "Desc"
}
}
]
}
'; echo