mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
XOAI.java skip empty list and dont add it to solr
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user