@Override public void commit() throws SearchServiceException { try { if (getSolr() != null) { getSolr().commit(); } } catch (Exception e) { throw new SearchServiceException(e.getMessage(), e); } }
performSearch(item); } catch (SearchServiceException e) { log.error(e.getMessage(),e);
/** Simple means to return the search result as an InputStream */ public java.io.InputStream searchAsInputStream(DiscoverQuery query) throws SearchServiceException, java.io.IOException { try { org.apache.commons.httpclient.methods.GetMethod method = new org.apache.commons.httpclient.methods.GetMethod(getSolr().getHttpClient().getHostConfiguration().getHostURL() + ""); method.setQueryString(query.toString()); getSolr().getHttpClient().executeMethod(method); return method.getResponseBodyAsStream(); } catch (org.apache.solr.client.solrj.SolrServerException e) { throw new SearchServiceException(e.getMessage(), e); } }
queryResults = searchService.search(context, scope, queryArgs); } catch (SearchServiceException e) { log.error(e.getMessage(), e);
@Override public DiscoverResult search(Context context, DiscoverQuery discoveryQuery, boolean includeUnDiscoverable) throws SearchServiceException { try { if (getSolr() == null) { return new DiscoverResult(); } SolrQuery solrQuery = resolveToSolrQuery(context, discoveryQuery, includeUnDiscoverable); QueryResponse queryResponse = getSolr().query(solrQuery, SolrRequest.METHOD.POST); return retrieveResult(context, discoveryQuery, queryResponse); } catch (Exception e) { throw new org.dspace.discovery.SearchServiceException(e.getMessage(), e); } }
queryResults = searchService.search(context, scope, queryArgs); } catch (SearchServiceException e) { log.error(e.getMessage(), e);
@Override public void buildSpellCheck() throws SearchServiceException { try { if (getSolr() == null) { return; } SolrQuery solrQuery = new SolrQuery(); solrQuery.set("spellcheck", true); solrQuery.set(SpellingParams.SPELLCHECK_BUILD, true); getSolr().query(solrQuery, SolrRequest.METHOD.POST); } catch (SolrServerException e) { //Make sure to also log the exception since this command is usually run from a crontab. log.error(e, e); throw new SearchServiceException(e); } }
log.error(e.getMessage(), e);
rsp = getSolr().query(query); } catch (SolrServerException e) { throw new SearchServiceException(e.getMessage(),e);
buildSearchResultsDivision(search); } catch (SearchServiceException e) { throw new UIException(e.getMessage(), e);
throw new SearchServiceException(e.getMessage(), e); } finally { context.abort();
throw new SearchServiceException(e.getMessage(), e); } finally
throw new SearchServiceException(e.getMessage(), e);
throw new org.dspace.discovery.SearchServiceException(e.getMessage(),e);