elasticsearch/elasticsearch — pull request #1879 by kireet (2012-04-22 16:11:14+00:00)
Title: fix issue 1870, clear the top docs phase before re-executing the search

in 1870 i reported that when the top children query must do an incremental search, no results were being returned. I found this happened because in TopChildrenQuery.createWeight(), there is an if/else there based on if parentDocs is not null. As a fix, in QueryPhase I added a call to clear(). I also edited a test case to create a reproduction scenario.