indexSearcher.search(_weight, null, wrapInTimeoutCollector(resultCollector));
} catch (TimeExceededException e) {
LOG.warn("encountered exceeded timout for query '" + _weight.getQuery() + " on shard '" + _shardName
+ "' with timeout set to '" + _timeout + "'");
}
TopDocs docs = resultCollector.topDocs();
return new SearchResult(docs.totalHits, docs.scoreDocs, _callIndex);
}
@SuppressWarnings({ "rawtypes" })
private Collector wrapInTimeoutCollector(TopDocsCollector resultCollector) {