У меня ES-запрос, как показано ниже:
{"query":{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"bool":{"should":[{"match":{"*login*":{"query":"jyo","operator":"and"}}}]}}],"boost":1.34}}]}}]}},"sort":[{"_uid":"desc"}]}
The output is :
{
"took": 77,
"timed_out": false,
"_shards": {
"total": 33,
"successful": 33,
"failed": 0
},
"hits": {
"total": 4,
"max_score": null,
"hits": [
{
"_index": "hobbes1.qa_en_19_2",
"_type": "esuser",
"_id": "6",
"_score": null,
"sort": [
"esuser#6"
]
},
{
"_index": "hobbes1.qa_en_19_2",
"_type": "esuser",
"_id": "5",
"_score": null,
"sort": [
"esuser#5"
]
},
{
"_index": "hobbes1.qa_en_19_2",
"_type": "esuser",
"_id": "4",
"_score": null,
"sort": [
"esuser#4"
]
},
{
"_index": "hobbes1.qa_en_19_2",
"_type": "esuser",
"_id": "10003",
"_score": null,
"sort": [
"esuser#10003"
]
}
]
}
}
Если он сортируется по _id, то разве 10003 не должно быть наверху?Я использую эластичный поиск версии 1.7.Пожалуйста, помогите.