elasticsearch/elasticsearch — pull request #7164 by martijnvg (2014-08-05 13:02:47+00:00)
Title: Aggregations: Properly support top_hits aggregation in a nested and reverse_nested aggregations.

At the moment the `top_hits` aggregation fails if it is being put in a nested or reverse_nested aggregations. This PR add proper support for nested inner objects being emitted as hits in the `top_hits` aggregator. All the known fetch phase features are supported.

This PR adds fetch infrastructure to get #3022 in as well.