}
public static BlurResults convertToHits(BlurResultIterable hitsIterable, BlurQuery query,
AtomicLongArray facetCounts, ExecutorService executor, Selector selector, final Iface iface, final String table)
throws InterruptedException, ExecutionException, BlurException {
BlurResults results = new BlurResults();
results.setTotalResults(hitsIterable.getTotalResults());
results.setShardInfo(hitsIterable.getShardInfo());
if (query.minimumNumberOfResults > 0) {
hitsIterable.skipTo(query.start);
int count = 0;
BlurIterator<BlurResult, BlurException> iterator = hitsIterable.iterator();
while (iterator.hasNext() && count < query.fetch) {
results.addToResults(iterator.next());
count++;
}
}
if (results.results == null) {
results.results = new ArrayList<BlurResult>();