@Test public void deleteDefaultBehaviourTest() throws IOException, SolrServerException { doReturn(this.patientDocReference).when(this.patient).getDocumentReference(); this.patientIndexer.delete(this.patient); verify(this.server).deleteByQuery("document:" + ClientUtils.escapeQueryChars(this.patientDocReference.toString())); verify(this.server).commit(); }
@Override public void delete(Patient patient) { try { this.server.deleteByQuery("document:" + ClientUtils.escapeQueryChars(this.referenceSerializer.serialize(patient.getDocumentReference()))); this.server.commit(); } catch (SolrServerException ex) { this.logger.warn("Failed to delete from Solr: {}", ex.getMessage()); } catch (IOException ex) { this.logger.warn("Error occurred while deleting Solr documents: {}", ex.getMessage()); } }
SolrPatientIndexer implements PatientIndexer, Initializable { @Override public void delete(Patient patient) { try { this.server.deleteByQuery("document:" + ClientUtils.escapeQueryChars(this.referenceSerializer.serialize(patient.getDocumentReference()))); this.server.commit(); } catch (SolrServerException ex) { this.logger.warn("Failed to delete from Solr: {}", ex.getMessage()); } catch (IOException ex) { this.logger.warn("Error occurred while deleting Solr documents: {}", ex.getMessage()); } } }
SolrPatientIndexer implements PatientIndexer, Initializable { @Override public void delete(Patient patient) { try { this.server.deleteByQuery("document:" + ClientUtils.escapeQueryChars(this.referenceSerializer.serialize(patient.getDocumentReference()))); this.server.commit(); } catch (SolrServerException ex) { this.logger.warn("Failed to delete from Solr: {}", ex.getMessage()); } catch (IOException ex) { this.logger.warn("Error occurred while deleting Solr documents: {}", ex.getMessage()); } }  }
SolrPatientIndexer implements PatientIndexer, Initializable { @Override public void delete(Patient patient) { try { this.server.deleteByQuery("document:" + ClientUtils.escapeQueryChars(this.referenceSerializer.serialize(patient.getDocumentReference()))); this.server.commit(); } catch (SolrServerException ex) { this.logger.warn("Failed to delete from Solr: {}", ex.getMessage()); } catch (IOException ex) { this.logger.warn("Error occurred while deleting Solr documents: {}", ex.getMessage()); } }  @Override void initialize(); @Override void index(Patient patient); @Override void delete(Patient patient); @Override void reindex(); }
SolrPatientIndexer implements PatientIndexer, Initializable { @Override public void delete(Patient patient) { try { this.server.deleteByQuery("document:" + ClientUtils.escapeQueryChars(this.referenceSerializer.serialize(patient.getDocumentReference()))); this.server.commit(); } catch (SolrServerException ex) { this.logger.warn("Failed to delete from Solr: {}", ex.getMessage()); } catch (IOException ex) { this.logger.warn("Error occurred while deleting Solr documents: {}", ex.getMessage()); } }  @Override void initialize(); @Override void index(Patient patient); @Override void delete(Patient patient); @Override void reindex();  }