/** * @param query * @return * @throws SiteException */ protected QueryResultList<Representation> performQuery(@PathParam(value = "site") String siteId, FieldQuery query) throws SiteException { return getSite(siteId).find(query); } @Override
QueryResultList<Representation> result; try { result = site.find(query); } catch (SiteException e) { String message = String.format("Unable to Query Site '%s' (message: %s)",
@Override public Collection<? extends Representation> lookup(String field, Set<String> includeFields, List<String> search, String... languages) throws IllegalStateException { //build the query and than return the result Site site = getSearchService(); if(site == null){ throw new IllegalStateException("ReferencedSite "+siteId+" is currently not available"); } FieldQuery query = EntitySearcherUtils.createFieldQuery(site.getQueryFactory(), field, includeFields, search, languages); if(limit != null){ query.setLimit(limit); } QueryResultList<Representation> results; try { results = site.find(query); } catch (SiteException e) { throw new IllegalStateException("Exception while searchign for "+ search+'@'+Arrays.toString(languages)+"in the ReferencedSite "+ site.getId(), e); } return results.results(); }
results = site.find(query); } catch (SiteException e) { throw new IllegalStateException("Exception while searchign for "+
log.debug(" > query site {}",site.getId()); try { QueryResultList<Representation> results = site.find(query); if(processedQuery == null){ processedQuery = results.getQuery();
log.debug(" > query site {}",site.getId()); try { QueryResultList<Representation> results = site.find(query); if(processedQuery == null){ processedQuery = results.getQuery();