failed to parse search source, expected field name but got [START_OBJECT]
<p>My Search Body:</p>

<pre><code>{
   "query":{
      "filtered":{
         "filter":{
            "bool":{
               "should":[
                  {
                     "term":{
                        "categories":2
                     }
                  },
                  {
                     "term":{
                        "categories":5                         
                     }
                  }
               ]
            }
         }
      },
      "bool":{
         "should":[
            {
               "match":{
                  "name":"perferendis"
               }
            },
            {
               "match":{
                  "brand":"in"
               }
            }
         ]
      }
   },
   "filter":{
      "and":{
         "filters":[
            {
               "bool":{
                  "must_not":{
                     "term":{
                        "condition":1
                     }
                  }
               }
            },
            {
               "range":{
                  "highest_sales_rank":{
                     "gte":96
                  }
               }
            },
            {
               "range":{
                  "review_rating":{
                     "gte":1
                  }
               }
            },
            {
               "range":{
                  "review_count":{
                     "gte":12
                  }
               }
            },
            {
               "range":{
                  "upper_price":{
                     "gte":68
                  }
               }
            },
            {
               "bool":{
                  "must_not":{
                     "term":{
                        "updated_at":0
                     }
                  }
               }
            }
         ]
      }
   },
   "sort":{
      "updated_at":"asc"
   },
   "size":10,
   "from":40
}
</code></pre>

<p>However if I take out the filtered part the query succeeds</p>

<pre><code>"filtered":{
         "filter":{
            "bool":{
               "should":[
                  {
                     "term":{
                        "categories":2
                     }
                  },
                  {
                     "term":{
                        "categories":5                         
                     }
                  }
               ]
            }
         }
      },
</code></pre>

<p>I previously used this format:</p>

<pre><code>"filter":{
  "bool":{
     "should":[
        {
           "match":{
              "categories":"16310211"
           }
        },
        {
           "match":{
              "categories":"493964"
           }
        }
     ]
  }
},
</code></pre>

<p>but it only works with elastic search 2, and as AWS only supports 1.5.6 I am not able to  use this format, related to my previous question <a href="https://stackoverflow.com/questions/35664220/narrowing-search-result-to-multiple-categories">Narrowing search result to multiple categories</a></p>