Handling ambiguous field names in search query

I have a query that I run against multiple indices. Some of the indices being searched share some common field names, and I'm not sure what the best way to differentiate between them would be.

I can get the desired result by doing a series of boolean queries, using a term query for _index with the desired index that I want the sub queries to fall under, but I'm wondering if this is an anti-pattern, or if it's terrible for performance.

Solution was to take advantage of field aliases.

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