Skip to content

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

Fix for RAMCache not flushing see: http://forum.yacy-websuche.de/viewtopic.php?f=6&t=1255

hermensd742cc080c33
diff --git a/source/de/anomic/index/indexRAMRI.java b/source/de/anomic/index/indexRAMRI.java
index 5ee381aeb..a11a90cc5 100644
--- a/source/de/anomic/index/indexRAMRI.java
+++ b/source/de/anomic/index/indexRAMRI.java
@@ -281,8 +281,11 @@ public final class indexRAMRI implements indexRI, indexRIReader {
if (c > 0) {
// removal successful
if (heap.has(wordHash)) {
- hashScore.decScore(wordHash);
+ hashScore.addScore(wordHash, -c);
hashDate.setScore(wordHash, intTime(System.currentTimeMillis()));
+ } else {
+ hashScore.deleteScore(wordHash);
+ hashDate.deleteScore(wordHash);
}
return c;
}