I think you'll need to provide more detailed materials namely the JSON for :

The mapping

An example doc

The query

From the query snippet you provided it looks like there's no "nested" clause so your query will match root-level docs not the nested attributes. Once we have a cut-down reproducible example of the scenario we can iterate further