Sorting breaks(May be because of number of shards)

Elastic search version: 5.6

Here is the simple Query,
one filter: Sort by name(asc), which breaks

{"query":{"bool":{"should":[{"bool":{"must":[{"term":{"type.id":"6"}}]}}]}},"from":"0","size":"50","sort":["_score",{"name.for_sort":{"order":"asc"}}]}

here are the results:

{
  "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,
          "email_address": null,
          "full_residential_address": "8645 3rd St. CHICO CA 95926",
          "full_mailing_address": null,
          "last_visit_reason": null,
          "last_deferred_visit_reason": null,
          "county": null,
          "phones": [
            {
              "relation": "primary",
              "type": "Cell",
              "number": "9160061109"
            }
          ],
          "addresses": [
            {
              "id": null,
              "type": "Residential",
              "address": {
                "id": null,
                "longitude": null,
                "lattitude": null,
                "deliverable": null,
                "street_address": "8645 3rd St.",
                "city": "CHICO",
                "state": "CA",
                "zip_code": "95926",
                "zip_suffix_code": null
              }
            }

and so on . . .

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.