Skip to content

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

- bugfix for snippet profile (no delete button) - bugfix for search process (avoided null pointer exception in case other peer does not respond)

orbiter918b59dc5e8a
diff --git a/htroot/IndexCreate_p.java b/htroot/IndexCreate_p.java
index dd55a70ea..bca1de11f 100644
--- a/htroot/IndexCreate_p.java
+++ b/htroot/IndexCreate_p.java
@@ -446,7 +446,9 @@ public class IndexCreate_p {
prop.put("crawlProfiles_"+count+"_storeCache", ((profile.storeHTCache()) ? 1 : 0));
prop.put("crawlProfiles_"+count+"_localIndexing", ((profile.localIndexing()) ? 1 : 0));
prop.put("crawlProfiles_"+count+"_remoteIndexing", ((profile.remoteIndexing()) ? 1 : 0));
- prop.put("crawlProfiles_"+count+"_deleteButton", (((profile.name().equals("remote")) || (profile.name().equals("proxy"))) ? 0 : 1));
+ prop.put("crawlProfiles_"+count+"_deleteButton", (((profile.name().equals("remote")) ||
+ (profile.name().equals("proxy")) ||
+ (profile.name().equals("snippet"))) ? 0 : 1));
prop.put("crawlProfiles_"+count+"_deleteButton_handle", profile.handle());
dark = !dark;
diff --git a/source/de/anomic/yacy/yacySearch.java b/source/de/anomic/yacy/yacySearch.java
index 2cfb7ac83..fc226f8d0 100644
--- a/source/de/anomic/yacy/yacySearch.java
+++ b/source/de/anomic/yacy/yacySearch.java
@@ -102,12 +102,14 @@ public class yacySearch extends Thread {
public void run() {
this.urls = yacyClient.search(wordhashes, urlhashes, prefer, filter, maxDistance, global, targetPeer, urlManager, containerCache, abstractCache, blacklist, snippetCache, timingProfile, rankingProfile);
- StringBuffer urllist = new StringBuffer(this.urls.length * 13);
- for (int i = 0; i < this.urls.length; i++) urllist.append(this.urls[i]).append(' ');
- yacyCore.log.logInfo("REMOTE SEARCH - remote peer " + targetPeer.hash + ":" + targetPeer.getName() + " contributed " + urls.length + " links for word hash " + wordhashes + ": " + new String(urllist));
if (urls != null) {
+ StringBuffer urllist = new StringBuffer(this.urls.length * 13);
+ for (int i = 0; i < this.urls.length; i++) urllist.append(this.urls[i]).append(' ');
+ yacyCore.log.logInfo("REMOTE SEARCH - remote peer " + targetPeer.hash + ":" + targetPeer.getName() + " contributed " + urls.length + " links for word hash " + wordhashes + ": " + new String(urllist));
yacyCore.seedDB.mySeed.incRI(urls.length);
yacyCore.seedDB.mySeed.incRU(urls.length);
+ } else {
+ yacyCore.log.logInfo("REMOTE SEARCH - no answer from remote peer " + targetPeer.hash + ":" + targetPeer.getName());
}
}