TopFieldCollector collector = TopFieldCollector.create(
sort, offset + limit, false, false, false, true);
// TODO Investigate use of searchAfter
searcher.search(convertToQuery(restrictions), collector);
List<LogEntry> result = new LinkedList<LogEntry>();
collectHits(searcher, collector.topDocs(offset), log.getDialect(), result);
return new ResultPage(result, offset, collector.getTotalHits());
} catch (IOException e) {
// Unexpected exception; wrap with CoreException
throw new CoreException(new Status(IStatus.ERROR, IndexPlugin.PLUGIN_ID,
NLS.bind(Messages.LuceneIndexService_error_failedToReadIndex,