/** * This method deletes all entries from the Solr index. */ public void delete() throws SolrServerException, IOException { server.deleteByQuery("*:*"); }
/** * Delete documents that satisfy a given query. * * @param query delete documents that satisfy this query. * @throws Exception */ public void deleteDocumentByQuery(String query)throws Exception{ mServer.deleteByQuery(query); }
/**Delete document from index by query**/ public void deleteDocumentByQuery(String query)throws Exception{ server.deleteByQuery(query); }
/** * This method deletes all entries from the Solr index. */ public void delete() throws SolrServerException, IOException { server.deleteByQuery("*:*"); }
@Override public void deleteRobotsByIsBotFlag() { try { solr.deleteByQuery("isBot:true"); } catch (Exception e) { log.error(e.getMessage(), e); } }
@Override public void deleteIP(String ip) { try { solr.deleteByQuery("ip:" + ip + "*"); } catch (Exception e) { log.error(e.getMessage(), e); } }
@Override public void removeIndex(String query) throws IOException, SolrServerException { solr.deleteByQuery(query); solr.commit(); }
//Delete particular column using Solr SolrServer solrServer; solrServer = new HttpSolrServer(url); solrServer.deleteByQuery("columnName:value"); solrServer.commit();
private void clearIndex() throws DSpaceSolrIndexerException { try { System.out.println("Clearing index"); solrServerResolver.getServer().deleteByQuery("*:*"); solrServerResolver.getServer().commit(); System.out.println("Index cleared"); } catch (SolrServerException | IOException ex) { throw new DSpaceSolrIndexerException(ex.getMessage(), ex); } }
SolrServer solrServer; String url = "http://localhost:8080/solr"; solrServer = new HttpSolrServer(url); solrServer.deleteByQuery("*:*"); solrServer.commit();
@Override public void clear(WikittyTransaction transaction) { try { // FIXME poussin 20100618 pourquoi n'est pas fait dans la transaction ? solrResource.init(); solrServer.deleteByQuery("*:*"); } catch (Exception eee) { throw new WikittyException("Error during clearing SolR data", eee); } }
@Override public void removeAllConcepts() throws ClassifierException { SolrServer solrServer = getActiveSolrServer(); try { solrServer.deleteByQuery("*:*"); solrServer.commit(); } catch (Exception e) { String msg = String.format("Error deleting concepts from Solr Core '%s'", solrCoreId); throw new ClassifierException(msg, e); } }
@Override public void removeAllConcepts() throws ClassifierException { SolrServer solrServer = getActiveSolrServer(); try { solrServer.deleteByQuery("*:*"); solrServer.commit(); } catch (Exception e) { String msg = String.format("Error deleting concepts from Solr Core '%s'", solrCoreId); throw new ClassifierException(msg, e); } }
@Override public synchronized void delete(final String field, final String value) { checkSession(); final String solrQuery = UnitQueryBuilder.createFieldQuery(field, value); try { LOG.debug("Deleting documents using sessionId: {} by query: {}", sessionId, solrQuery); solrUpdateServer.deleteByQuery(solrQuery); } catch (final SolrServerException e) { final String msg = "Deletion documents by query failed (Solr Server Error response): "; LOG.warn(msg, e); throw new GeneralServiceException(e, msg); } catch (final IOException e) { final String msg = "Deletion documents by query failed: "; LOG.warn(msg, e); throw new GeneralServiceException(e, msg); } }
@Override public void clear(WikittyTransaction transaction) { try { // FIXME poussin 20100618 pourquoi n'est pas fait dans la transaction ? solrResource.init(); getSolrServer().deleteByQuery("*:*"); } catch (Exception eee) { throw new WikittyException("Error during clearing SolR data", eee); } }
@Override public void removeConcept(String conceptId) throws ClassifierException { if (conceptId == null || conceptId.isEmpty()) { throw new ClassifierException("conceptId must not be null or empty"); } SolrServer solrServer = getActiveSolrServer(); try { solrServer.deleteByQuery(conceptUriField + ":" + ClientUtils.escapeQueryChars(conceptId)); solrServer.commit(); } catch (Exception e) { String msg = String .format("Error removing concept '%s' on Solr Core '%s'", conceptId, solrCoreId); throw new ClassifierException(msg, e); } }
public void clear() throws IndexServiceException { try { solr.server().deleteByQuery("*:*"); solr.server().commit(); } catch (SolrServerException e) { throw new IndexServiceException(e); } catch (IOException e) { throw new IndexServiceException(e); } }
private void removeAllIndex() { try { solrServer.deleteByQuery("*:*"); solrServer.commit(); } catch (SolrServerException e) { throw new TechnicalException( "Error executing query for clearing SOLR index!", e); } catch (IOException e) { throw new TechnicalException( "IO error during executing query for clearing SOLR index!", e); } catch (SolrException e) { throw new TechnicalException( "Error executing query for clearing SOLR index!", e); } }
/** * Delete all the documents */ public void clear() throws SolrServerException, IOException { this.getServer().deleteByQuery("*:*"); this.getServer().commit(); }
/** * Delete all the documents */ public void clear() throws SolrServerException, IOException { this.getServer().deleteByQuery("*:*"); this.getServer().commit(); }