I necessitate to query multiple indices and I was evaluating the alternative to listing all indices in the URL.
Aside of aliases, It seems I could use the meta-field _index to list the indices in the payload of my request. However, I was wondering if that approach has any impact on which shards are going to be searched on.
In other words, if I specify _index equal to 'index1' and 'index2' and if my ES contains 40 indices each with one shard, is the query specifying:
"indices" : ["index1", "index2"],
going to target only the two shards of those two indices or all the 40 shards present in the instance and then exclude those that don't meet the criteria afterwards?