savedSearch = savedSearchService.get(savedSearchId);
} else {
savedSearch = null;
}
searchResult = search.search();
if (searchResult.getError() != null) {
return ok(views.html.search.queryerror.render(currentUser(), q, searchResult, savedSearch, fields, stream));
}
searchResult.setAllFields(getAllFields());