我在ElasticSearch中有一个mget调用来获取特定文档
{ "index" : appConfig.ElasticSearch.Module.index, "type" : appConfig.ElasticSearch.Module.type, "body" : { "ids": modulesIds } }
如何在文档的某些"xyz"属性上对生成的文档进行排序?
我认为你不能这样做.相反,如果您已经知道ID,为什么不这样做呢:
GET /my_index/_search { "query": { "filtered": { "filter": { "ids": { "values": [ "1","2","3" ] } } } }, "sort": [ { "whatever": { "order": "desc" } } ] }