_queryCache.remove(key);
}
}
}
BlurUtil.setStartTime(original);
BlurResultIterable hitsIterable = null;
try {
AtomicLongArray facetCounts = BlurUtil.getAtomicLongArraySameLengthAsList(blurQuery.facets);
hitsIterable = _indexManager.query(table, blurQuery, facetCounts);
// Data will be fetch by IndexManager if selector is provided.
// This should only happen if the Shard server is accessed directly.
BlurResults blurResults = BlurUtil.convertToHits(hitsIterable, blurQuery, facetCounts, null, null, this, table);
if (selector != null) {
return blurResults;
}
if (ENABLE_CACHE) {
return _queryCache.cache(table, original, blurResults);
}
return blurResults;
} catch (BlurException e) {
throw e;
} catch (Exception e) {
LOG.error("Unknown error during search of [table={0},searchQuery={1}]", e, table, blurQuery);
throw new BException(e.getMessage(), e);
} finally {
if (hitsIterable != null) {
hitsIterable.close();
}
}
} catch (Exception e) {
LOG.error("Unknown error during search of [table={0},searchQuery={1}]", e, table, blurQuery);
if (e instanceof BlurException) {