Sorting on multi nested fields. getting the error

With this below query iam getting failures from some shards. i have given the query, error and index mapping below. can any one give me the solution to this error.

Query:
GET /contacts_master_index/_search
{
“track_total_hits”: true,
“_source”: [“profile_data”],
“query”: {
“bool”: {
“must”:
}
},

"sort" : [
  {
     "profile_data.form_data.section_custom_fields_data.data.number": {
        
        "order" : "asc",
        "missing": "_last", 
        "nested": {
           "path": "profile_data",
           "filter": {
              "match": {"profile_data.form_id":  1145516163535765505}
           },
           "nested": {
              "path": "profile_data.form_data",
              "filter": {
                 "match": {"profile_data.form_data.section_id": "1128904918347059201"}
              },
              "nested":{
                "path": "profile_data.form_data.section_custom_fields_data",
                "filter":{
                  "bool":{
                    "must":[
                      {
                         "match": {"profile_data.form_data.section_custom_fields_data.field_id_gridlex_enterprise_field_master": "5002"}
                      }
                      ]
                  }
                }
               
              }
           }
        }
     }
  }

]
}

Error:
“_shards” : {
“total” : 5,
“successful” : 1,
“skipped” : 0,
“failed” : 4,
“failures” : [
{
“shard” : 0,
“index” : “contacts_master_index”,
“node” : “P2H7vJM4R5yNlzWuaQ_c4Q”,
“reason” : {
“type” : “illegal_state_exception”,
“reason” : “Parent query must not match any docs besides parent filter. Combine them as must (+) and must-not (-) clauses to find a problem doc. docID=3778602”
}
},
{
“shard” : 2,
“index” : “contacts_master_index”,
“node” : “xKSthSwPQvimlHrmfKzhHw”,
“reason” : {
“type” : “illegal_state_exception”,
“reason” : “Parent query must not match any docs besides parent filter. Combine them as must (+) and must-not (-) clauses to find a problem doc. docID=896420”
}
},
{
“shard” : 3,
“index” : “contacts_master_index”,
“node” : “0XsWmsG_TX6D67fRBF6TMw”,
“reason” : {
“type” : “illegal_state_exception”,
“reason” : “Parent query must not match any docs besides parent filter. Combine them as must (+) and must-not (-) clauses to find a problem doc. docID=2754015”
}
},
{
“shard” : 4,
“index” : “contacts_master_index”,
“node” : “xKSthSwPQvimlHrmfKzhHw”,
“reason” : {
“type” : “illegal_state_exception”,
“reason” : “Parent query must not match any docs besides parent filter. Combine them as must (+) and must-not (-) clauses to find a problem doc. docID=2951404”
}
}
]
}

also refer to this mapping:
mapping : {
“contacts_master_index” : {
“mappings” : {
“dynamic” : “strict”,
“properties” : {

    "contact_id" : {
      "type" : "long"
    },
 
    "profile_data" : {
      "type" : "nested",
      "include_in_parent" : true,
      "properties" : {
        "form_data" : {
          "type" : "nested",
          "include_in_parent" : true,
          "properties" : {
            "section_custom_fields_data" : {
              "type" : "nested",
              "include_in_parent" : true,
              "properties" : {
                "created_at" : {
                  "type" : "date",
                  "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis||yyyy-MM-dd HH:mm:ss.SSSSSSZ || yyyy-MM-dd HH:mm:ss.SSSSSS",
                  "ignore_malformed" : true
                },
                "created_by" : {
                  "type" : "integer"
                },
                "data" : {
                  "type" : "text",
                  "fields" : {
                    "keyword" : {
                      "type" : "keyword"
                    },
                    "keywordsort" : {
                      "type" : "keyword",
                      "normalizer" : "case_insensitive"
                    },
                    "number" : {
                      "type" : "long",
                      "ignore_malformed" : true
                    }
                  }
                },
                "field_id_gridlex_enterprise_field_master" : {
                  "type" : "long"
                },
                "show_flag" : {
                  "type" : "boolean"
                },
                "type_of_field" : {
                  "type" : "text",
                  "fields" : {
                    "keyword" : {
                      "type" : "keyword"
                    },
                    "keywordsort" : {
                      "type" : "keyword",
                      "normalizer" : "case_insensitive"
                    }
                  }
                },
                "updated_at" : {
                  "type" : "date",
                  "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis||yyyy-MM-dd HH:mm:ss.SSSSSSZ || yyyy-MM-dd HH:mm:ss.SSSSSS",
                  "ignore_malformed" : true
                },
                "updated_by" : {
                  "type" : "integer"
                }
              }
            },
            "section_custom_objects_data" : {
              "type" : "nested",
              "include_in_parent" : true,
              "properties" : {
                "created_at" : {
                  "type" : "date",
                  "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis||yyyy-MM-dd HH:mm:ss.SSSSSSZ || yyyy-MM-dd HH:mm:ss.SSSSSS",
                  "ignore_malformed" : true
                },
                "created_by" : {
                  "type" : "integer"
                },
                "instance_map_id_gridlex_master" : {
                  "type" : "long"
                },
                "object_id_gridlex_custom_object_master" : {
                  "type" : "long"
                },
                "show_flag" : {
                  "type" : "boolean"
                },
                "updated_at" : {
                  "type" : "date",
                  "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis||yyyy-MM-dd HH:mm:ss.SSSSSSZ || yyyy-MM-dd HH:mm:ss.SSSSSS",
                  "ignore_malformed" : true
                },
                "updated_by" : {
                  "type" : "integer"
                }
              }
            },
            "section_id" : {
              "type" : "long"
            }
          }
        },
        "form_id" : {
          "type" : "long"
        }
      }
    },
   
  }
}

}
}