From d742cc080c33f896ea02d84ff9e5c9f0fa8ac2e0 Mon Sep 17 00:00:00 2001 From: hermens Date: Thu, 19 Jun 2008 18:27:48 +0000 Subject: [PATCH] Fix for RAMCache not flushing see: http://forum.yacy-websuche.de/viewtopic.php?f=6&t=1255 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4940 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/index/indexRAMRI.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }