results.facetCounts = BlurUtil.toList(facetCounts);
}
if (selector != null) {
List<Future<FetchResult>> futures = new ArrayList<Future<FetchResult>>();
for (int i = 0; i < results.results.size(); i++) {
BlurResult result = results.results.get(i);
final Selector s = new Selector(selector);
s.setLocationId(result.locationId);
futures.add(executor.submit(new Callable<FetchResult>() {
@Override
public FetchResult call() throws Exception {
return iface.fetchRow(table, s);
}
}));
}
for (int i = 0; i < results.results.size(); i++) {
Future<FetchResult> future = futures.get(i);
BlurResult result = results.results.get(i);
result.setFetchResult(future.get());
}
}
results.query = query;
results.query.selector = selector;
return results;