Query DSL: How to use WILDCARD queries on _id

How to use WILDCARD queries on _id
While searching for specific type of Watcher runs (triggered_watches), I was looking for a run of a specific type of watcher which contains a keyword in the _id. But when I do a wildcard on _id, it throws below error.
How to do wildcard queries on _id?

{
  "error" : {
    "root_cause" : [
      {
        "type" : "query_shard_exception",
        "reason" : "Can only use wildcard queries on keyword, text and wildcard fields - not on [_id] which is of type [_id]",
        "index_uuid" : "SnC46pycQYaCAh087OsXAQ",
        "index" : ".triggered_watches"
      }
    ],
    "type" : "search_phase_execution_exception",
    "reason" : "all shards failed",
    "phase" : "query",
    "grouped" : true,
    "failed_shards" : [
      {
        "shard" : 0,
        "index" : ".triggered_watches",
        "node" : "q-9vxgtYQy2xxxxxqRQ",
        "reason" : {
          "type" : "query_shard_exception",
          "reason" : "Can only use wildcard queries on keyword, text and wildcard fields - not on [_id] which is of type [_id]",
          "index_uuid" : "SnC46pycQYxxxxxXAQ",
          "index" : ".triggered_watches"
        }
      }
    ]
  },
  "status" : 400
}

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