enhanced cleanup function

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5488 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent cb76d9e0e4
commit d1bace5e4d

@ -243,10 +243,13 @@ public final class plasmaSearchEvent {
cleanEvent = i.next(); cleanEvent = i.next();
if ((all) || (cleanEvent.eventTime + eventLifetime < System.currentTimeMillis())) { if ((all) || (cleanEvent.eventTime + eventLifetime < System.currentTimeMillis())) {
// execute deletion of failed words // execute deletion of failed words
final Set<String> removeWords = cleanEvent.query.queryHashes; int rw = cleanEvent.failedURLs.size();
removeWords.addAll(cleanEvent.query.excludeHashes); if (rw > 0) {
cleanEvent.wordIndex.removeEntriesMultiple(removeWords, cleanEvent.failedURLs.keySet()); final Set<String> removeWords = cleanEvent.query.queryHashes;
serverLog.logInfo("SearchEvents", "cleaning up event " + cleanEvent.query.id(true) + ", removed " + cleanEvent.failedURLs.size() + " URL references on " + removeWords.size() + " words"); removeWords.addAll(cleanEvent.query.excludeHashes);
cleanEvent.wordIndex.removeEntriesMultiple(removeWords, cleanEvent.failedURLs.keySet());
serverLog.logInfo("SearchEvents", "cleaning up event " + cleanEvent.query.id(true) + ", removed " + rw + " URL references on " + removeWords.size() + " words");
}
// remove the event // remove the event
i.remove(); i.remove();

Loading…
Cancel
Save