SolrDocument doc = (SolrDocument) iter.next();
String handle = (String) doc.getFieldValue("handle");
DSpaceObject o = HandleManager.resolveToObject(context, handle);
if (o == null) {
log.info("Deleting: " + handle);
/*
* Use IndexWriter to delete, its easier to manage
* write.lock
*/
unIndexContent(context, handle);
} else {
context.removeCached(o, o.getID());
log.debug("Keeping: " + handle);
}
}
}
} catch (Exception e) {