Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

bugfixes

orbiter56d28a16f088
diff --git a/htroot/CacheAdmin_p.java b/htroot/CacheAdmin_p.java
index 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.java
index 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 size
map.put(serverCodings.enhancedCoder.encodeHex(singleResult.size(), 8) + singleHash, singleResult);
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 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 ser
log.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 fetching
int globalresults = 0;
diff --git a/source/de/anomic/yacy/yacyCore.java b/source/de/anomic/yacy/yacyCore.java
index 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);