}
// Return the result
try {
SearchResult result = repository.find(query);
return Response.ok(result.toXml()).build();
} catch (ContentRepositoryException e) {
logger.error("Error trying to access the content repository", e);
throw new WebApplicationException(e);
}