XOAI.java skip empty list and dont add it to solr

This commit is contained in:
ssolim
2019-02-06 09:42:23 +01:00
committed by Mark H. Wood
parent 44a3111e41
commit 0b12168218

View File

@@ -315,9 +315,11 @@ public class XOAI {
}
}
System.out.println("Total: " + i + " items");
server.add(list);
server.commit(true, true);
list.clear();
if (i > 0) {
server.add(list);
server.commit(true, true);
list.clear();
}
return i;
} catch (SolrServerException | IOException ex) {
throw new DSpaceSolrIndexerException(ex.getMessage(), ex);