@Test public void delById() throws IOException, SolrServerException { UpdateResponse updateResponse = solrClient.deleteById("8888888"); long elapsedTime = updateResponse.getElapsedTime(); int qTime = updateResponse.getQTime(); String requestUrl = updateResponse.getRequestUrl(); NamedList<Object> response = updateResponse.getResponse(); NamedList responseHeader = updateResponse.getResponseHeader(); solrClient.commit(); int status = updateResponse.getStatus(); }
@RequestMapping("/delById/{id}") public String delById(@PathVariable("id") String id) throws IOException, SolrServerException { UpdateResponse updateResponse = solrClient.deleteById(id); long elapsedTime = updateResponse.getElapsedTime(); int qTime = updateResponse.getQTime(); String requestUrl = updateResponse.getRequestUrl(); NamedList<Object> response = updateResponse.getResponse(); NamedList responseHeader = updateResponse.getResponseHeader(); solrClient.commit(); int status = updateResponse.getStatus(); return status == 0 ? "success" : "failed"; }
SolrController { @RequestMapping("/delById/{id}") public String delById(@PathVariable("id") String id) throws IOException, SolrServerException { UpdateResponse updateResponse = solrClient.deleteById(id); long elapsedTime = updateResponse.getElapsedTime(); int qTime = updateResponse.getQTime(); String requestUrl = updateResponse.getRequestUrl(); NamedList<Object> response = updateResponse.getResponse(); NamedList responseHeader = updateResponse.getResponseHeader(); solrClient.commit(); int status = updateResponse.getStatus(); return status == 0 ? "success" : "failed"; } }
SolrController { @RequestMapping("/delById/{id}") public String delById(@PathVariable("id") String id) throws IOException, SolrServerException { UpdateResponse updateResponse = solrClient.deleteById(id); long elapsedTime = updateResponse.getElapsedTime(); int qTime = updateResponse.getQTime(); String requestUrl = updateResponse.getRequestUrl(); NamedList<Object> response = updateResponse.getResponse(); NamedList responseHeader = updateResponse.getResponseHeader(); solrClient.commit(); int status = updateResponse.getStatus(); return status == 0 ? "success" : "failed"; }  }
SolrController { @RequestMapping("/delById/{id}") public String delById(@PathVariable("id") String id) throws IOException, SolrServerException { UpdateResponse updateResponse = solrClient.deleteById(id); long elapsedTime = updateResponse.getElapsedTime(); int qTime = updateResponse.getQTime(); String requestUrl = updateResponse.getRequestUrl(); NamedList<Object> response = updateResponse.getResponse(); NamedList responseHeader = updateResponse.getResponseHeader(); solrClient.commit(); int status = updateResponse.getStatus(); return status == 0 ? "success" : "failed"; }  @RequestMapping("/addUsers") void addUsers(); @RequestMapping("/addUser") void addUser(); @RequestMapping("/getById/{id}") String getByIdFromSolr(@PathVariable("id") String id); @RequestMapping("/updateUser") void updateUser(); @RequestMapping("/delById/{id}") String delById(@PathVariable("id") String id); @RequestMapping("/delAll") void delAll(); @RequestMapping("/queryAllOne") String queryAllOne(); @RequestMapping("/queryAll") Object queryAll(); }
SolrController { @RequestMapping("/delById/{id}") public String delById(@PathVariable("id") String id) throws IOException, SolrServerException { UpdateResponse updateResponse = solrClient.deleteById(id); long elapsedTime = updateResponse.getElapsedTime(); int qTime = updateResponse.getQTime(); String requestUrl = updateResponse.getRequestUrl(); NamedList<Object> response = updateResponse.getResponse(); NamedList responseHeader = updateResponse.getResponseHeader(); solrClient.commit(); int status = updateResponse.getStatus(); return status == 0 ? "success" : "failed"; }  @RequestMapping("/addUsers") void addUsers(); @RequestMapping("/addUser") void addUser(); @RequestMapping("/getById/{id}") String getByIdFromSolr(@PathVariable("id") String id); @RequestMapping("/updateUser") void updateUser(); @RequestMapping("/delById/{id}") String delById(@PathVariable("id") String id); @RequestMapping("/delAll") void delAll(); @RequestMapping("/queryAllOne") String queryAllOne(); @RequestMapping("/queryAll") Object queryAll();  }