Performance considerations when accessing _index field


My question is similar to Performance of the _index field

I want to understand how the query rewrite works internally and if there are any caveats w.r.t performance when using _index to conditionally apply filters while querying on an alias.

If someone could point me to any github issue or some documentation where this might have been discussed, that would be helpful.


If you only want to query some of the indices, why query through the alias in the first place?

Sorry, If the intention of the question is not clear.

There are cases where one needs to use _index as a filter similar to the ones in the attached link above (basically mix filter clauses where a set of filters need to be applied only for Index 1 and another set of filters for only Index 2).

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