//This way, all the documents with that DocumentId will be erased.
String lastAddition = String.valueOf((Long) (lastOperation.get(key)));
if ( logger.isEnabledFor(Level.DEBUG)) {
logger.debug("Applying deletes: searching " + docIdName + " = [" + key + "]");
}
ScorelessHitCollector collector = new HashSetScorelessHitCollector();
searcher.search(new TermQuery(new Term(docIdName, key)), collector);
Set<Integer> docIds = collector.getMatchingDocuments();
if ( logger.isEnabledFor(Level.DEBUG)) {
logger.debug("Applying deletes: found matches: " + docIds.size());
}
for (Integer docId : docIds) {
Document d = searcher.doc(docId);