[bool] malformed query, expected [END_OBJECT] but found [FIELD_NAME]

**Request**

POST customer_details/_search
{
 "_source": {
"includes": [ "globalName", "customerName","type" ,"container.type"]

},
"query": {
 "bool": {
      "filter": [
        {
            "has_parent":
             {
                "parent_type": "container",
                "query":
                 {
                    "bool": 
                    {
                        "filter":
                         [
                            {
                                "terms":
                                 {
                                    "type": [ "compartment","block","room" ]
                                }
                            }
                        ]
                    }
                 }
             }
        }  
     ]                  
    },
   
  "match_all": {}
}
}

**Responce**

{
  "error" : {
    "root_cause" : [
      {
        "type" : "parsing_exception",
        "reason" : "[bool] malformed query, expected [END_OBJECT] but found [FIELD_NAME]",
        "line" : 33,
        "col" : 3
      }
    ],
    "type" : "parsing_exception",
    "reason" : "[bool] malformed query, expected [END_OBJECT] but found [FIELD_NAME]",
    "line" : 33,
    "col" : 3
  },
  "status" : 400
}


Could some one please suggest me .

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