//copied from IndexSearcher#search
//we only accept indexSearcher atm which means we can copy its the Collector creation strategy
final int maxDocs = Math.min( n, searcher.getSearcher().maxDoc() );
final Weight weight = preparedQuery.weight( searcher.getSearcher() );
if ( sort == null ) {
topCollector = TopScoreDocCollector.create(maxDocs, !weight.scoresDocsOutOfOrder());
}
else {
boolean fillFields = true;
topCollector = TopFieldCollector.create(
sort,