}
Query userQuery = QueryParserUtil.parseQuery(simpleQuery.query, simpleQuery.rowQuery, fieldManager,
rowFilterForSearch, docFilter, getScoreType(simpleQuery.scoreType), context);
Query facetedQuery;
FacetExecutor executor = null;
if (blurQuery.facets != null) {
long[] facetMinimums = getFacetMinimums(blurQuery.facets);
executor = new FacetExecutor(blurQuery.facets.size(), facetMinimums, facetedCounts, running);
facetedQuery = new FacetQuery(userQuery, getFacetQueries(blurQuery, fieldManager, context, rowFilterForSearch,
recordFilterForSearch), executor);
} else {
facetedQuery = userQuery;
}
Sort sort = getSort(blurQuery, fieldManager);
call = new SimpleQueryParallelCall(running, table, status, facetedQuery, blurQuery.selector,
_queriesInternalMeter, shardServerContext, runSlow, _fetchCount, _maxHeapPerRowFetch,
context.getSimilarity(), context, sort, _deepPagingCache);
trace.done();
MergerBlurResultIterable merger = new MergerBlurResultIterable(blurQuery);
BlurResultIterable merge = ForkJoin.execute(_executor, blurIndexes.entrySet(), call, new Cancel() {
@Override
public void cancel() {
running.set(false);
}
}).merge(merger);
if (executor != null) {
executor.processFacets(_facetExecutor);
}
return fetchDataIfNeeded(merge, table, blurQuery.getSelector());
} catch (StopExecutionCollectorException e) {
BlurQueryStatus queryStatus = status.getQueryStatus();
QueryState state = queryStatus.getState();