if (searchSourceBuilder != null) {
searchRequest.extraSource(searchSourceBuilder);
}
SearchResponse searchResponse = searchAction.execute(searchRequest).get();
viewContext.queriesAndHits(queryName, searchResponse.hits());
} catch (Exception e) {
viewContext.queriesAndHits(queryName, null);
}
}