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");
|
System.out.println("Total: " + i + " items");
|
||||||
server.add(list);
|
if (i > 0) {
|
||||||
server.commit(true, true);
|
server.add(list);
|
||||||
list.clear();
|
server.commit(true, true);
|
||||||
|
list.clear();
|
||||||
|
}
|
||||||
return i;
|
return i;
|
||||||
} catch (SolrServerException | IOException ex) {
|
} catch (SolrServerException | IOException ex) {
|
||||||
throw new DSpaceSolrIndexerException(ex.getMessage(), ex);
|
throw new DSpaceSolrIndexerException(ex.getMessage(), ex);
|
||||||
|
Reference in New Issue
Block a user