sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values());
hits = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults).hits();
assertThat(hits.totalHits(), equalTo(100l));
assertThat(hits.hits().length, equalTo(40));
for (int i = 0; i < 40; i++) {
SearchHit hit = hits.hits()[i];
// System.out.println(hit.id() + " " + hit.explanation());
// we don't do perfect sorting when it comes to scroll with Query+Fetch
// assertThat("id[" + hit.id() + "]", hit.id(), equalTo(Integer.toString(100 - 60 - 1 - i)));
assertThat("make sure we don't have duplicates", expectedIds.remove(hit.id()), notNullValue());
}