mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Before the aggregation tree was traversed to figure out what the parent level is, this commit changes that by using `NestedScope` to figure out the nested depth level. The big upsides are that this cleans up `NestedAggregator` (it used a hack to lazily figure out the nested parent filter) and this is also what `nested` query uses and therefor the `nested` query can be included inside `nested` aggregation and work correctly. Closes #11749 Closes #12410