Indices Query : throws parse exception

I am trying to query across indexes and filter for one index. But for a start I thought first I will try default indices query they have mentioned in the doc portal, Indices Query | Elasticsearch Guide [2.0] | Elastic

I get a parse exception while executing this query, it looks like there is no handler for this query type. Please help,

GET /_search
{
  "indices": {
    "indices": [
      "shivtestindex2",
      "shivtestindex2events"
    ],
    "query": {
      "match": {
        "iid": "1234567"
      }
    }
  }
}

Error:

Parse Failure [No parser for element [indices]]]; }]","status":400}

Nevermind... I feel really stupid... forgot to start with query block... sorry for the post...:disappointed:

Doesn't matter, we all make mistakes!

1 Like