Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
small fixes
orbiter25a62cdc3f5c
diff --git a/defaults/yacy.init b/defaults/yacy.initindex 10cef80b3..1c80ab643 100644--- a/defaults/yacy.init+++ b/defaults/yacy.init@@ -494,7 +494,7 @@ proxyIndexingLocalMedia=true# Be careful with this number. Consider a branching factor of average 20;# A prefetch-depth of 8 would index 25.600.000.000 pages, maybe the whole WWW.crawlingDepth=3-crawlingIfOlder=525600+crawlingIfOlder=-1crawlingDomFilterDepth=-1crawlingDomMaxPages=-1indexText=truediff --git a/source/de/anomic/kelondro/kelondroMScoreCluster.java b/source/de/anomic/kelondro/kelondroMScoreCluster.javaindex a31176b60..b1d664b6e 100644--- a/source/de/anomic/kelondro/kelondroMScoreCluster.java+++ b/source/de/anomic/kelondro/kelondroMScoreCluster.java@@ -54,11 +54,14 @@ public final class kelondroMScoreCluster<E> {* shrink the cluster to a demanded size* @param maxsize*/- public void shrinkToMaxSize(int maxsize) {+ public synchronized void shrinkToMaxSize(int maxsize) {if (maxsize < 0) return;+ Long key;while (refkeyDB.size() > maxsize) {// find and remove smallest objects until cluster has demanded size- refkeyDB.remove(keyrefDB.remove(keyrefDB.firstKey()));+ key = keyrefDB.firstKey();+ if (key == null) break;+ refkeyDB.remove(keyrefDB.remove(key));}}@@ -66,12 +69,13 @@ public final class kelondroMScoreCluster<E> {* shrink the cluster in such a way that the smallest score is equal or greater than a given minScore* @param minScore*/- public void shrinkToMinScore(int minScore) {+ public synchronized void shrinkToMinScore(int minScore) {int score;Long key;while (true) {// find and remove objects where their score is smaller than the demanded minimum scorekey = keyrefDB.firstKey();+ if (key == null) break;score = (int) ((key.longValue() & 0xFFFFFFFF00000000L) >> 32);if (score >= minScore) break;refkeyDB.remove(keyrefDB.remove(key));