Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
re-introduced global search limitation when index receive is switched off this was necessary because othervise robinson peers did also global searches, which cannot be a wanted effect
orbiter159aaf888906
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.javaindex 55cc16af9..fc2628284 100644--- a/htroot/yacysearch.java+++ b/htroot/yacysearch.java@@ -234,7 +234,7 @@ public class yacysearch {// prepare search propertiesfinal boolean yacyonline = ((yacyCore.seedDB != null) && (yacyCore.seedDB.mySeed() != null) && (yacyCore.seedDB.mySeed().getPublicAddress() != null));- final boolean globalsearch = (global) && (yacyonline);+ final boolean globalsearch = (global) && (yacyonline) && (sb.getConfigBool(plasmaSwitchboard.INDEX_RECEIVE_ALLOW, false));// do the searchTreeSet<String> queryHashes = plasmaCondenser.words2hashes(query[0]);diff --git a/source/de/anomic/plasma/plasmaSearchEvent.java b/source/de/anomic/plasma/plasmaSearchEvent.javaindex abe663baa..69f865a30 100644--- a/source/de/anomic/plasma/plasmaSearchEvent.java+++ b/source/de/anomic/plasma/plasmaSearchEvent.java@@ -582,23 +582,18 @@ public final class plasmaSearchEvent {if ((localSearchThread != null) && (localSearchThread.isAlive())) {// in case that the local search takes longer than some other remote search requests,// do some sleeps to give the local process a chance to contribute- try {Thread.sleep(200);} catch (InterruptedException e) {}+ try {Thread.sleep(item * 100);} catch (InterruptedException e) {}}// now wait until as many remote worker threads have finished, as we want to display resultswhile ((this.primarySearchThreads != null) && (this.primarySearchThreads.length > item) && (anyWorkerAlive()) &&((this.resultList.size() <= item) || (countFinishedRemoteSearch() <= item))) {try {Thread.sleep(100);} catch (InterruptedException e) {}}- // finally wait until enough results are there produced from the snippet fetch process- while ((anyWorkerAlive()) && (this.resultList.size() <= item)) {- try {Thread.sleep(100);} catch (InterruptedException e) {}- }- } else {- // we did a local search. If we arrive here, the local search process was finished- // and the only things we need to wait for are snippets from snippet fetch processes- while ((anyWorkerAlive()) && (this.resultList.size() <= item)) {- try {Thread.sleep(100);} catch (InterruptedException e) {}- }++ }+ // finally wait until enough results are there produced from the snippet fetch process+ while ((anyWorkerAlive()) && (this.resultList.size() <= item)) {+ try {Thread.sleep(100);} catch (InterruptedException e) {}}// finally, if there is something, return the result