Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added option to allow/disallow DHT transmission during indexing see also http://forum.yacy.de/viewtopic.php?f=9&t=8
orbiterf1ed91a8e42b
diff --git a/htroot/ConfigNetwork_p.html b/htroot/ConfigNetwork_p.htmlindex 292d4950d..5ebce9bdd 100644--- a/htroot/ConfigNetwork_p.html+++ b/htroot/ConfigNetwork_p.html@@ -74,7 +74,15 @@<input type="radio" value="off" id="indexDistributeWhileCrawlingOff"name="indexDistributeWhileCrawling"#(indexDistributeWhileCrawling.off)#::checked="checked" #(/indexDistributeWhileCrawling.off)#/>- <label for="indexDistributeWhileCrawlingOff">disabled during crawling</label>.+ <label for="indexDistributeWhileCrawlingOff">disabled during crawling</label>.<br>+ <input type="radio" value="on" id="indexDistributeWhileIndexingOn"+ name="indexDistributeWhileIndexing"+ #(indexDistributeWhileIndexing.on)#::checked="checked" #(/indexDistributeWhileIndexing.on)#/>+ <label for="indexDistributeWhileIndexingOn">enabled</label> /+ <input type="radio" value="off" id="indexDistributeWhileIndexingOff"+ name="indexDistributeWhileIndexing"+ #(indexDistributeWhileIndexing.off)#::checked="checked" #(/indexDistributeWhileIndexing.off)#/>+ <label for="indexDistributeWhileIndexingOff">disabled during indexing</label>.</dd><dt><label for="indexReceive">Index Receive</label>diff --git a/htroot/ConfigNetwork_p.java b/htroot/ConfigNetwork_p.javaindex a2b13f642..13768a318 100644--- a/htroot/ConfigNetwork_p.java+++ b/htroot/ConfigNetwork_p.java@@ -89,6 +89,12 @@ public class ConfigNetwork_p {sb.setConfig(plasmaSwitchboard.INDEX_DIST_ALLOW_WHILE_CRAWLING, "false");}+ if (post.get("indexDistributeWhileIndexing","").equals("on")) {+ sb.setConfig(plasmaSwitchboard.INDEX_DIST_ALLOW_WHILE_INDEXING, "true");+ } else {+ sb.setConfig(plasmaSwitchboard.INDEX_DIST_ALLOW_WHILE_INDEXING, "false");+ }+if (indexReceive) {sb.setConfig("allowReceiveIndex", "true");yacyCore.seedDB.mySeed.setFlagAcceptRemoteIndex(true);@@ -139,6 +145,8 @@ public class ConfigNetwork_p {prop.put("indexDistributeChecked", (indexDistribute) ? 1 : 0);prop.put("indexDistributeWhileCrawling.on", (sb.getConfig(plasmaSwitchboard.INDEX_DIST_ALLOW_WHILE_CRAWLING, "true").equals("true")) ? 1 : 0);prop.put("indexDistributeWhileCrawling.off", (sb.getConfig(plasmaSwitchboard.INDEX_DIST_ALLOW_WHILE_CRAWLING, "true").equals("true")) ? 0 : 1);+ prop.put("indexDistributeWhileIndexing.on", (sb.getConfig(plasmaSwitchboard.INDEX_DIST_ALLOW_WHILE_INDEXING, "true").equals("true")) ? 1 : 0);+ prop.put("indexDistributeWhileIndexing.off", (sb.getConfig(plasmaSwitchboard.INDEX_DIST_ALLOW_WHILE_INDEXING, "true").equals("true")) ? 0 : 1);prop.put("indexReceiveChecked", (indexReceive) ? 1 : 0);prop.put("indexReceiveBlockBlacklistChecked.on", (sb.getConfig("indexReceiveBlockBlacklist", "true").equals("true")) ? 1 : 0);prop.put("indexReceiveBlockBlacklistChecked.off", (sb.getConfig("indexReceiveBlockBlacklist", "true").equals("true")) ? 0 : 1);diff --git a/htroot/Steering.java b/htroot/Steering.javaindex a577f19dd..4929e83a7 100644--- a/htroot/Steering.java+++ b/htroot/Steering.java@@ -73,7 +73,7 @@ public class Steering {}if (post.containsKey("shutdown")) {- sb.terminate(3000);+ sb.terminate(5000);prop.put("info", 3);return prop;}diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex 7a1953c82..d2a4e687a 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -537,6 +537,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser* @see plasmaSwitchboard#INDEX_DIST_ALLOW*/public static final String INDEX_DIST_ALLOW_WHILE_CRAWLING = "allowDistributeIndexWhileCrawling";+ public static final String INDEX_DIST_ALLOW_WHILE_INDEXING = "allowDistributeIndexWhileIndexing";public static final String INDEX_TRANSFER_TIMEOUT = "indexTransfer.timeout";public static final String INDEX_TRANSFER_GZIP_BODY = "indexTransfer.gzipBody";@@ -3209,10 +3210,12 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serif (wordIndex.size() < 100) {return "no DHT distribution: not enough words - wordIndex.size() = " + wordIndex.size();}- if ((getConfig(INDEX_DIST_ALLOW_WHILE_CRAWLING, "false").equalsIgnoreCase("false")) &&- ((noticeURL.stackSize() > 0) /*|| (sbQueue.size() > 3)*/)) {+ if ((getConfig(INDEX_DIST_ALLOW_WHILE_CRAWLING, "false").equalsIgnoreCase("false")) && (noticeURL.stackSize() > 0)) {return "no DHT distribution: crawl in progress: noticeURL.stackSize() = " + noticeURL.stackSize() + ", sbQueue.size() = " + sbQueue.size();}+ if ((getConfig(INDEX_DIST_ALLOW_WHILE_INDEXING, "false").equalsIgnoreCase("false")) && (sbQueue.size() > 1)) {+ return "no DHT distribution: indexing in progress: noticeURL.stackSize() = " + noticeURL.stackSize() + ", sbQueue.size() = " + sbQueue.size();+ }return null;}diff --git a/yacy.init b/yacy.initindex c9f7bd3d2..88bdf96e2 100644--- a/yacy.init+++ b/yacy.init@@ -410,6 +410,7 @@ yacyDB=DATA/YACYDB# you may switch this offallowDistributeIndex=trueallowDistributeIndexWhileCrawling=false+allowDistributeIndexWhileIndexing=trueallowReceiveIndex=trueallowUnlimitedReceiveIndexFrom=indexReceiveBlockBlacklist=true