// loop over all documents in updateQueue
for (int i = 0; i < updateCopy.size(); i++) {
String resourceUrl = updateCopy.get(i).get(OlatDocument.RESOURCEURL_FIELD_NAME);
Term term = new Term(OlatDocument.RESOURCEURL_FIELD_NAME, resourceUrl );
log.info("updateQueue:delete documents with resourceUrl=" + resourceUrl );
indexReader.deleteDocuments(term);
}
// loop over all documents in deleteQueue
for (int i = 0; i < deleteCopy.size(); i++) {
String resourceUrl = deleteCopy.get(i).get(OlatDocument.RESOURCEURL_FIELD_NAME);
Term term = new Term(OlatDocument.RESOURCEURL_FIELD_NAME, resourceUrl );