How do inner hits work inside filtered aliases?

I want to create a filtered alias that contains a nested query with inner_hits. I'd like to then run a more-specific nested query with inner_hits against that filtered alias.

The inner hits from the filtered alias seem to get clobbered by the inner hits of the top-level query, and it has me wondering what the behavior is even supposed to be here.

Inner hits aside, when ES runs a filtered query on top of a filtered alias, how is that handled internally? Part of me thinks the alias is evaluated to return a set of document IDs, and then the top-level query is scoped to that set. Another part of me thinks they become two parts of a single bool query. Can anyone shed some light on this?

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