elasticsearch/elasticsearch — pull request #6346 by martijnvg (2014-05-30 09:15:52+00:00)
Title: Fix top_hits reduce error in case of empty shard results

The top_hits agg returned an empty InternalTopHits instance with no fields set when there were no result, causing reduce and serialization errors down the road. This is fixed by setting all required fields when a there are no results.