Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
switch on core.service.rwi when switching back from portal mode to p2p mode
orbiter6daae5947986
diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.javaindex 10ed80e3e..7612a1816 100644--- a/htroot/ConfigBasic.java+++ b/htroot/ConfigBasic.java@@ -177,6 +177,7 @@ public class ConfigBasic {if (post != null && post.containsKey("usecase")) {if ("freeworld".equals(post.get("usecase", "")) && !"freeworld".equals(networkName)) {// switch to freeworld network+ sb.setConfig(SwitchboardConstants.CORE_SERVICE_RWI, true);sb.switchNetwork("defaults/yacy.network.freeworld.unit");// switch to p2p modesb.setConfig(SwitchboardConstants.INDEX_DIST_ALLOW, true);@@ -188,6 +189,7 @@ public class ConfigBasic {}if ("portal".equals(post.get("usecase", "")) && !"webportal".equals(networkName)) {// switch to webportal network+ sb.setConfig(SwitchboardConstants.CORE_SERVICE_RWI, false);sb.switchNetwork("defaults/yacy.network.webportal.unit");// switch to robinson modesb.setConfig(SwitchboardConstants.INDEX_DIST_ALLOW, false);@@ -199,6 +201,7 @@ public class ConfigBasic {}if ("intranet".equals(post.get("usecase", "")) && !"intranet".equals(networkName)) {// switch to intranet network+ sb.setConfig(SwitchboardConstants.CORE_SERVICE_RWI, false);sb.switchNetwork("defaults/yacy.network.intranet.unit");// switch to p2p mode: enable ad-hoc networks between intranet userssb.setConfig(SwitchboardConstants.INDEX_DIST_ALLOW, false);diff --git a/htroot/IndexFederated_p.html b/htroot/IndexFederated_p.htmlindex e6ed45ce0..0cdbe4a0e 100644--- a/htroot/IndexFederated_p.html+++ b/htroot/IndexFederated_p.html@@ -103,7 +103,7 @@The 'RWI' (Reverse Word Index) is necessary for index transmission in distributed mode. For portal or intranet mode this must be switched off.<dl>- <dt><input type="checkbox" name="core.service.rwi.tmp" id="core_service_rwi" #(core.service.rwi.tmp.checked)#:: checked="checked"#(/core.service.rwi.tmp.checked)# /></dt>+ <dt><input type="checkbox" name="core.service.rwi" id="core_service_rwi" #(core.service.rwi.checked)#:: checked="checked"#(/core.service.rwi.checked)# /></dt><dd>support peer-to-peer index transmission (DHT RWI index)</dd><dt><input type="submit" name="setrwi" value="Set" /></dt><dd></dd>diff --git a/htroot/IndexFederated_p.java b/htroot/IndexFederated_p.javaindex 082800b36..d3685e51f 100644--- a/htroot/IndexFederated_p.java+++ b/htroot/IndexFederated_p.java@@ -48,7 +48,7 @@ public class IndexFederated_p {if (post != null && post.containsKey("setrwi")) {//yacy- boolean post_core_rwi = post.getBoolean(SwitchboardConstants.CORE_SERVICE_RWI);+ boolean post_core_rwi = post.getBoolean("core.service.rwi");final boolean previous_core_rwi = sb.index.connectedRWI() && env.getConfigBool(SwitchboardConstants.CORE_SERVICE_RWI, false);env.setConfig(SwitchboardConstants.CORE_SERVICE_RWI, post_core_rwi);if (previous_core_rwi && !post_core_rwi) sb.index.disconnectRWI(); // switch off@@ -171,7 +171,7 @@ public class IndexFederated_p {}prop.put(SwitchboardConstants.CORE_SERVICE_FULLTEXT + ".checked", env.getConfigBool(SwitchboardConstants.CORE_SERVICE_FULLTEXT, false) ? 1 : 0);- prop.put(SwitchboardConstants.CORE_SERVICE_RWI + ".checked", env.getConfigBool(SwitchboardConstants.CORE_SERVICE_RWI, false) ? 1 : 0);+ prop.put("core.service.rwi.checked", env.getConfigBool(SwitchboardConstants.CORE_SERVICE_RWI, false) ? 1 : 0);prop.put(SwitchboardConstants.CORE_SERVICE_CITATION + ".checked", env.getConfigBool(SwitchboardConstants.CORE_SERVICE_CITATION, false) ? 1 : 0);prop.put(SwitchboardConstants.CORE_SERVICE_WEBGRAPH + ".checked", env.getConfigBool(SwitchboardConstants.CORE_SERVICE_WEBGRAPH, false) ? 1 : 0);prop.put("solr.indexing.solrremote.checked", env.getConfigBool(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_ENABLED, false) ? 1 : 0);