排序结果中断
使用的弹性搜索版本:5.6
以下是查询:
{"query":{"bool":{"should":[{"bool":{"must":[{"term":{"type.id":"6"}}]}}]}},"from":"0","size":"50","sort":["_score",{"name.for_sort":{"order":"asc"}}]}
结果如下: 在这里,我们可以看到碎片总数为2,而一旦从两个不同的数据源中提取数据,就会出现此问题。
{
"took": 99,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"hits": {
"total": 1842,
"max_score": null,
"hits": [
{
"_index": "facilities-lis_1556745845008",
"_type": "facility",
"_id": "100002204",
"_score": 2.1180937,
"_source": {
"href": null,
"id": "100002204",
"capacity_last_changed": null,
"type": {
"id": "6",
"value": "Foster Family Home"
},
"adoption_home_only_indicator": null,
"name": "Alls Well Home",
"licensee_name": "Ravi Chintamaneni",
"license_type": null,
"assigned_worker": {
"phones": [],
"email": null,
"full_name": null,
"id": null
},
"district_office": {
"number": null,
"name": null
},
"license_number": "100002204",
"status": null,
"capacity": null,
"adjusted_capacity": null,
"available_beds": null,
"license_effective_date": null,
"original_application_recieved_date": null,
"last_visit_date": null,
"last_deferred_visit_date": null,
,依此类推。 。