Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
bugfixes
orbiter56d28a16f088
diff --git a/htroot/CacheAdmin_p.java b/htroot/CacheAdmin_p.javaindex 130f0fbe5..72d6035ad 100644--- a/htroot/CacheAdmin_p.java+++ b/htroot/CacheAdmin_p.java@@ -146,6 +146,7 @@ public class CacheAdmin_p {}private static String formatHeader(httpHeader header) {+ if (header == null) return "- no header in header cache -";String out = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";Iterator it = header.entrySet().iterator();Map.Entry entry;diff --git a/source/de/anomic/plasma/plasmaSearch.java b/source/de/anomic/plasma/plasmaSearch.javaindex 242b8d57e..b22a3d79a 100644--- a/source/de/anomic/plasma/plasmaSearch.java+++ b/source/de/anomic/plasma/plasmaSearch.java@@ -153,7 +153,7 @@ public final class plasmaSearch {singleResult = wordIndex.getEntity(singleHash, true);// check result- if (singleResult.size() == 0) return new plasmaWordIndexEntity(null); // as this is a cunjunction of searches, we have no result if any word is not known+ if ((singleResult == null) || (singleResult.size() == 0)) return new plasmaWordIndexEntity(null); // as this is a cunjunction of searches, we have no result if any word is not known// store result in order of result sizemap.put(serverCodings.enhancedCoder.encodeHex(singleResult.size(), 8) + singleHash, singleResult);diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex a533d7766..634019d34 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -1199,8 +1199,13 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serlog.logInfo("INIT WORD SEARCH: " + gs + " - " + count + " links, " + (time / 1000) + " seconds");long timestamp = System.currentTimeMillis();- Thread preselect = new presearch(queryhashes, order, time / 10, urlmask, 5);- preselect.start();+ if (global) {+ // start a presearch, which makes only sense if we idle afterwards.+ // this is especially the case if we start a global search and idle until search+ // results appear from other peers+ Thread preselect = new presearch(queryhashes, order, time / 10, urlmask, 5);+ preselect.start();+ }// do global fetchingint globalresults = 0;diff --git a/source/de/anomic/yacy/yacyCore.java b/source/de/anomic/yacy/yacyCore.javaindex b039ee925..ff762509c 100644--- a/source/de/anomic/yacy/yacyCore.java+++ b/source/de/anomic/yacy/yacyCore.java@@ -324,6 +324,8 @@ public class yacyCore {log.logInfo("publish: handshaked " + this.seed.get("PeerType", "senior") + " peer '" + this.seed.getName() + "' at " + this.seed.getAddress());}} catch (Exception e) {+ log.logError("publishThread: error with target seed " + seed.getMap() + ": " + e.getMessage());+ e.printStackTrace();this.error = e;} finally {this.syncList.add(this);