Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- tried to fix the '4217666-problem' - removed more unused code
orbiter2f629d20a70f
diff --git a/source/de/anomic/kelondro/kelondroRowCollection.java b/source/de/anomic/kelondro/kelondroRowCollection.javaindex 08a090687..079fd834a 100644--- a/source/de/anomic/kelondro/kelondroRowCollection.java+++ b/source/de/anomic/kelondro/kelondroRowCollection.java@@ -322,8 +322,8 @@ public class kelondroRowCollection {assert (alength > 0);assert (astart + alength <= a.length);if (bugappearance(a, astart, alength)) {- System.out.println("*** DEBUG: patched wrong a = " + serverLog.arrayList(a, astart, alength));- return false; // TODO: this is temporary; remote peers may still submit bad entries+ System.out.println("*** DEBUG warning: wrong a = " + serverLog.arrayList(a, astart, alength));+ //return false; // TODO: this is temporary; remote peers may still submit bad entries}assert (!(bugappearance(a, astart, alength))) : "a = " + serverLog.arrayList(a, astart, alength);int l = Math.min(rowdef.objectsize, Math.min(alength, a.length - astart));diff --git a/source/de/anomic/yacy/yacySeed.java b/source/de/anomic/yacy/yacySeed.javaindex 0199bf7c3..4779fcfed 100644--- a/source/de/anomic/yacy/yacySeed.java+++ b/source/de/anomic/yacy/yacySeed.java@@ -155,7 +155,7 @@ public class yacySeed {public static final String NCOUNT = "NCount";/** the number of links that the peer provides for remote crawls (ZURL's) */public static final String RCOUNT = "RCount";- /** the number of words the peer has indexed (as it says) */+ /** the number of different words the peer has indexed */public static final String ICOUNT = "ICount";/** the number of seeds that the peer has stored */public static final String SCOUNT = "SCount";@@ -694,48 +694,7 @@ public class yacySeed {final double toPos = dhtPosition(to);return (fromPos <= toPos) ? (toPos - fromPos) : (1.0 - fromPos + toPos);}- /*- private static String bestNewHash(yacySeedDB seedDB) {- if ((seedDB == null) || (seedDB.sizeConnected() <= 8)) {- // use random hash- return randomHash();- }-- int tries = Math.max(1, Math.min(32, seedDB.sizeConnected() / 2));- String hash;- String bestHash = null;- double c, bestC = Double.MAX_VALUE;- double segmentSize = Math.min(0.9, 4.0 / seedDB.sizeConnected());- Iterator<yacySeed> i;- double d;- yacySeed s;- for (int t = 0; t < tries; t++) {- hash = randomHash();- i = seedDB.seedsConnected(true, true, hash, (float) 0.0);- c = 0.0;- while (i.hasNext()) {- s = i.next();- d = dhtDistance(hash, s.hash);- if (d > segmentSize) break;- c = c + 1.0/d;- }- System.out.println("BESTHASH " + hash + " = " + c);- if (c < bestC) {- bestC = c;- bestHash = hash;- System.out.println("BESTHASH " + hash + " is best now");- }- }- if (bestHash == null) return randomHash();-- // at this point we know only the position of a peer sequence- double bestPosition = dhtPosition(bestHash) + (segmentSize / 2);- if (bestPosition > 1.0) bestPosition = bestPosition - 1.0;- bestHash = positionToHash(bestPosition);- System.out.println("BESTHASH finally is " + bestHash);- return bestHash;- }- */+private static String bestGap(yacySeedDB seedDB) {if ((seedDB == null) || (seedDB.sizeConnected() <= 2)) {// use random hash