private void commitDeletes(String collectionName, List<String> deleteIds) throws SolrServerException, IOException { if (deleteIds.size() == 0) return; solrClient.request(newUpdateRequest().deleteById(deleteIds), collectionName); }
public UpdateRequest deleteById(String id, Long version) { return deleteById(id, null, version); }
public UpdateRequest deleteById(String id, Long version) { return deleteById(id, null, version); }
public UpdateRequest deleteById(String id, String route) { return deleteById(id, route, null); }
public UpdateRequest deleteById(String id, String route) { return deleteById(id, route, null); }
private void commitDeletes(String collectionName, List<String> deleteIds) throws SolrServerException, IOException { if (deleteIds.size() == 0) return; solrClient.request(newUpdateRequest().deleteById(deleteIds), collectionName); }
private void commitDeletes(String collectionName, List<String> deleteIds) throws SolrServerException, IOException { if (deleteIds.size() == 0) return; solrClient.request(newUpdateRequest().deleteById(deleteIds), collectionName); }
private void commitDeletes(String collectionName, List<String> deleteIds) throws SolrServerException, IOException { if (deleteIds.size() == 0) return; solrClient.request(newUpdateRequest().deleteById(deleteIds), collectionName); }
public UpdateResponse deleteById(String id) throws SolrServerException, IOException { return new UpdateRequest().deleteById( id ).process( this ); }
public UpdateResponse deleteById(List<String> ids) throws SolrServerException, IOException { return new UpdateRequest().deleteById( ids ).process( this ); }
/** * Deletes a list of documents by unique ID, specifying max time before commit * * @param collection the Solr collection to delete the documents from * @param ids the list of document IDs to delete; must be non-null and contain elements * @param commitWithinMs max time (in ms) before a commit will happen * * @return an {@link org.apache.solr.client.solrj.response.UpdateResponse} containing the response * from the server * * @throws IOException If there is a low-level I/O error. * @throws SolrServerException if there is an error on the server * * @since 5.1 */ public UpdateResponse deleteById(String collection, List<String> ids, int commitWithinMs) throws SolrServerException, IOException { if (ids == null) throw new IllegalArgumentException("'ids' parameter must be non-null"); if (ids.isEmpty()) throw new IllegalArgumentException("'ids' parameter must not be empty; should contain IDs to delete"); UpdateRequest req = new UpdateRequest(); req.deleteById(ids); req.setCommitWithin(commitWithinMs); return req.process(this, collection); }
protected UpdateResponse del(SolrClient client, SolrParams params, Object... ids) throws IOException, SolrServerException { UpdateRequest ureq = new UpdateRequest(); ureq.setParams(new ModifiableSolrParams(params)); for (Object id: ids) { ureq.deleteById(id.toString()); } return ureq.process(client); }
/** * Deletes a single document by unique ID, specifying max time before commit * * @param collection the Solr collection to delete the document from * @param id the ID of the document to delete * @param commitWithinMs max time (in ms) before a commit will happen * * @return an {@link org.apache.solr.client.solrj.response.UpdateResponse} containing the response * from the server * * @throws IOException If there is a low-level I/O error. * @throws SolrServerException if there is an error on the server * * @since 5.1 */ public UpdateResponse deleteById(String collection, String id, int commitWithinMs) throws SolrServerException, IOException { UpdateRequest req = new UpdateRequest(); req.deleteById(id); req.setCommitWithin(commitWithinMs); return req.process(this, collection); }
/** * Deletes a list of documents by unique ID, specifying max time before commit * * @param collection the Solr collection to delete the documents from * @param ids the list of document IDs to delete * @param commitWithinMs max time (in ms) before a commit will happen * * @return an {@link org.apache.solr.client.solrj.response.UpdateResponse} containing the response * from the server * * @throws IOException If there is a low-level I/O error. * @throws SolrServerException if there is an error on the server * * @since 5.1 */ public UpdateResponse deleteById(String collection, List<String> ids, int commitWithinMs) throws SolrServerException, IOException { UpdateRequest req = new UpdateRequest(); req.deleteById(ids); req.setCommitWithin(commitWithinMs); return req.process(this, collection); }
private void sendDeletes(List deletes) throws SolrServerException, IOException { if (deletes.size() > 0) { UpdateRequest req = new UpdateRequest(); for (Object delete : deletes) { if (delete instanceof String) { req.deleteById((String)delete); // add the delete to the req list } else { String query = ((QueryStringHolder)delete).getQuery(); req.deleteByQuery(query); // add the delete to the req list } } req.setCommitWithin(-1); log(req.process(server)); deletes.clear(); } }
private void sendDeletes(List deletes) throws SolrServerException, IOException { if (deletes.size() > 0) { UpdateRequest req = new UpdateRequest(); for (Object delete : deletes) { if (delete instanceof String) { req.deleteById((String)delete); // add the delete to the req list } else { String query = ((QueryStringHolder)delete).getQuery(); req.deleteByQuery(query); // add the delete to the req list } } req.setCommitWithin(-1); log(req.process(server)); deletes.clear(); } }
if (controlClient != null) { UpdateRequest req = new UpdateRequest(); req.deleteById(deleteId); req.setParam("CONTROL", "TRUE"); req.process(controlClient);
/** * Deletes a single document by unique ID, specifying max time before commit * * @param collection the Solr collection to delete the document from * @param id the ID of the document to delete * @param commitWithinMs max time (in ms) before a commit will happen * * @return an {@link org.apache.solr.client.solrj.response.UpdateResponse} containing the response * from the server * * @throws IOException If there is a low-level I/O error. * @throws SolrServerException if there is an error on the server * * @since 5.1 */ public UpdateResponse deleteById(String collection, String id, int commitWithinMs) throws SolrServerException, IOException { UpdateRequest req = new UpdateRequest(); req.deleteById(id); req.setCommitWithin(commitWithinMs); return req.process(this, collection); }
update.deleteById(idStrings); processUpdate(openConnection(), update, isImmediate);
updateRequest.deleteById(s);