Simple Springboot application using Java + Spring data solr.
Trying to delete the data from solr, it is not working properly.
No error. Simply when we check the data again, it still exists.
@Resource
private SolrEmployeeRepository repo;
public ServiceImpl(SolrEmployeeRepository repo) {
this.repo = repo;
}
@Transactional
public boolean deleteOperation(Employee emp){
repo.delete(emp);
}
// I tried deleteById(id), deleteAll() etc.. But nothing is working
Note: But We are able to add new data into solr. Only problem is delete operation.
Eg:
@Resource
private SolrEmployeeRepository repo;
public ServiceImpl(SolrEmployeeRepository repo) {
this.repo = repo;
}
@Transactional
public boolean saveOperation(List<Employee> emp){
repo.saveAll(emp);
}
Is there any alternative for deleting? Any different approach?