mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
[ SEARCH-2090 ] Delete node only if that exists (SEARCH-2096)
This commit is contained in:
+13
-6
@@ -2297,16 +2297,23 @@ public class SolrInformationServer implements InformationServer
|
||||
|
||||
private void deleteErrorNode(UpdateRequestProcessor processor, SolrQueryRequest request, Node node) throws IOException
|
||||
{
|
||||
DeleteUpdateCommand delErrorDocCmd = new DeleteUpdateCommand(request);
|
||||
delErrorDocCmd.setId(PREFIX_ERROR + node.getId());
|
||||
processor.processDelete(delErrorDocCmd);
|
||||
String errorDocId = PREFIX_ERROR + node.getId();
|
||||
if (getDocListSize(FIELD_SOLR4_ID + ":" + errorDocId) > 0)
|
||||
{
|
||||
DeleteUpdateCommand delErrorDocCmd = new DeleteUpdateCommand(request);
|
||||
delErrorDocCmd.setId(errorDocId);
|
||||
processor.processDelete(delErrorDocCmd);
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteNode(UpdateRequestProcessor processor, SolrQueryRequest request, long dbid) throws IOException
|
||||
{
|
||||
DeleteUpdateCommand delDocCmd = new DeleteUpdateCommand(request);
|
||||
delDocCmd.setQuery(FIELD_DBID + ":" + dbid);
|
||||
processor.processDelete(delDocCmd);
|
||||
if (getDocListSize(FIELD_DBID + ":" + dbid) > 0)
|
||||
{
|
||||
DeleteUpdateCommand delDocCmd = new DeleteUpdateCommand(request);
|
||||
delDocCmd.setQuery(FIELD_DBID + ":" + dbid);
|
||||
processor.processDelete(delDocCmd);
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteNode(UpdateRequestProcessor processor, SolrQueryRequest request, Node node) throws IOException
|
||||
|
||||
Reference in New Issue
Block a user