From 1309619a7193ec37acb5b43ee1d5dd5f1486583a Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Wed, 4 Feb 2015 11:37:07 +0100 Subject: [PATCH] remove remote indexing option in crawl start if not in p2p mode --- htroot/CrawlStartExpert.html | 5 +++-- htroot/CrawlStartExpert.java | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/htroot/CrawlStartExpert.html b/htroot/CrawlStartExpert.html index 5760f1455..a68125815 100644 --- a/htroot/CrawlStartExpert.html +++ b/htroot/CrawlStartExpert.html @@ -515,7 +515,7 @@
Index Administration
-
Do Local Indexing
+
Indexing
info This enables indexing of the webpages the crawler will download. This should be switched on by default, unless you want to crawl only to fill the @@ -526,7 +526,7 @@ :
- + #(remoteindexing)#::
info @@ -549,6 +549,7 @@
+ #(/remoteindexing)#
diff --git a/htroot/CrawlStartExpert.java b/htroot/CrawlStartExpert.java index e763b335c..9d4c0ae49 100644 --- a/htroot/CrawlStartExpert.java +++ b/htroot/CrawlStartExpert.java @@ -554,18 +554,25 @@ public class CrawlStartExpert { prop.put("indexingMediaChecked", env.getConfigBool("indexMedia", true) ? 1 : 0); // Do Remote Indexing? - prop.put("crawlOrderChecked", - env.getConfigBool("crawlOrder", true) ? 1 : 0); - // Remote crawl intention - prop.put("intention", ""); + if (sb.isP2PMode()) { + prop.put("remoteindexing", 1); + prop.put("remoteindexing_crawlOrderChecked", env.getConfigBool("crawlOrder", true) ? 1 : 0); + prop.put("remoteindexing_intention", ""); + } else { + prop.put("remoteindexing", 0); + } } else { prop.put("indexingTextChecked", post.getBoolean("indexText") ? 1 : 0); prop.put("indexingMediaChecked", post.getBoolean("indexMedia") ? 1 : 0); - prop.put("crawlOrderChecked", - post.getBoolean("crawlOrder") ? 1 : 0); - prop.put("intention", post.get("intention", "")); + if (sb.isP2PMode()) { + prop.put("remoteindexing", 1); + prop.put("remoteindexing_crawlOrderChecked", post.getBoolean("crawlOrder") ? 1 : 0); + prop.put("remoteindexing_intention", post.get("intention", "")); + } else { + prop.put("remoteindexing", 0); + } } // Target collection