Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

follow-up to latest commit: also flush the search cache if all crawls had been terminated.

Michael Peter Christen3d7dd9d3aaa2
diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java
index 3bd21d71e..1ecbffa5e 100644
--- a/source/net/yacy/search/Switchboard.java
+++ b/source/net/yacy/search/Switchboard.java
@@ -2492,6 +2492,10 @@ public final class Switchboard extends serverSwitch {
}
}
if (allCrawlsFinished) {
+ // refresh the search cache
+ SearchEventCache.cleanupEvents(true);
+ sb.index.clearCaches(); // every time the ranking is changed we need to remove old orderings
+
if (postprocessing) {
// run postprocessing on all profiles
ReferenceReportCache rrCache = index.getReferenceReportCache();