Hello,
According to the Elasticsearch 5.6 Reindex API document.
I have encountered the problem when running _reindex
API as following command:
curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
{
"size": 10,
"source": {
"index": "twitter",
"query": {
"function_score" : {
"query" : { "match_all": {} },
"random_score" : {}
}
},
"sort": "_score"
},
"dest": {
"index": "random_twitter"
}
}
'
Error message:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Unsupported sort [{\n \"_score\" : {\n \"order\" : \"desc\"\n }\n}]"
}
],
"type" : "illegal_argument_exception",
"reason" : "Unsupported sort [{\n \"_score\" : {\n \"order\" : \"desc\"\n }\n}]"
},
"status" : 400
}