From 3631cb1f6dcb770535bcab162e220fb4f98d4e3e Mon Sep 17 00:00:00 2001 From: theli Date: Tue, 15 Nov 2005 12:23:46 +0000 Subject: [PATCH] *) deleting empty entities during index selection git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1086 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaWordIndexDistribution.java | 7 +++++++ source/yacy.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/plasma/plasmaWordIndexDistribution.java b/source/de/anomic/plasma/plasmaWordIndexDistribution.java index 77d005579..c2a5242f8 100644 --- a/source/de/anomic/plasma/plasmaWordIndexDistribution.java +++ b/source/de/anomic/plasma/plasmaWordIndexDistribution.java @@ -378,6 +378,13 @@ public final class plasmaWordIndexDistribution { indexEntity.removeEntry(nextUrlHash, true); this.urlPool.loadedURL.remove(nextUrlHash); } + + // deleting entity if there are no more entries left + // This could occure if there are unknownURLs in the entity + if (indexEntity.size() == 0) { + indexEntity.deleteComplete(); + } + // use whats remaining this.log.logFine("Selected partial index (" + tmpEntity.size() + " from " + indexEntity.size() +" URLs, " + unknownURLEntries.size() + " not bound) for word " + tmpEntity.wordHash()); tmpEntities.add(tmpEntity); diff --git a/source/yacy.java b/source/yacy.java index 2b9204c1b..ea7567bf6 100644 --- a/source/yacy.java +++ b/source/yacy.java @@ -626,7 +626,7 @@ public final class yacy { while (words.hasMoreElements()) try { wordfile = (File) words.nextElement(); wordhash = wordfile.getName().substring(0, 12); - System.out.println("NOW: " + wordhash); + //System.out.println("NOW: " + wordhash); migrationStatus = wordIndexCache.migrateWords2Assortment(wordhash); if (migrationStatus instanceof Integer) { int migrationCount = ((Integer)migrationStatus).intValue();