Skip to content

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

- removed option to search for audio, video and applications. These things are still experimental and should not be shown to new users since this would cause them to argue that YaCy does not work. The functions are stil available, because: - added a configuration option in ConfigPortal to swtich the search media types on or off

orbiterc659310e89e8
diff --git a/defaults/yacy.init b/defaults/yacy.init
index 775e59a06..f10eb92b1 100644
--- a/defaults/yacy.init
+++ b/defaults/yacy.init
@@ -724,9 +724,9 @@ search.options = true
# search domains. If set to false then that search is not available
search.text = true
search.image = true
-search.audio = true
-search.video = true
-search.app = true
+search.audio = false
+search.video = false
+search.app = false
# number of search results displayed by default
search.items = 10
diff --git a/htroot/ConfigPortal.html b/htroot/ConfigPortal.html
index 8410d8d81..4fdebd010 100644
--- a/htroot/ConfigPortal.html
+++ b/htroot/ConfigPortal.html
@@ -48,6 +48,15 @@
<input type="radio" name="search.options" value="false" #(search.options)#checked="checked"::#(/search.options)# />do not show Advanced Search
</dd>
+ <dt>Show Media Search Options</dt>
+ <dd>
+ <input type="checkbox" name="search.text" value="true" #(search.text)#::checked="checked"#(/search.text)# />Text&nbsp;
+ <input type="checkbox" name="search.image" value="true" #(search.image)#::checked="checked"#(/search.image)# />Images&nbsp;
+ <input type="checkbox" name="search.audio" value="true" #(search.audio)#::checked="checked"#(/search.audio)# />Audio&nbsp;
+ <input type="checkbox" name="search.video" value="true" #(search.video)#::checked="checked"#(/search.video)# />Video&nbsp;
+ <input type="checkbox" name="search.app" value="true" #(search.app)#::checked="checked"#(/search.app)# />Applications
+ </dd>
+
<dt>Snippet Fetch Strategy &amp; Link Verification</dt>
<dd>
<input type="radio" name="search.verify" value="nocache" #(search.verify.nocache)#::checked="checked"#(/search.verify.nocache)# onclick="document.getElementById('search_verify_delete').disabled=false;document.getElementById('search_verify_delete').checked=true;"/>NOCACHE: no use of web cache, load all snippets online<br/>
diff --git a/htroot/ConfigPortal.java b/htroot/ConfigPortal.java
index ca685fef1..dbb411244 100644
--- a/htroot/ConfigPortal.java
+++ b/htroot/ConfigPortal.java
@@ -74,11 +74,19 @@ public class ConfigPortal {
sb.setConfig("publicTopmenu", post.getBoolean("publicTopmenu", true));
sb.setConfig("publicSearchpage", post.getBoolean("publicSearchpage", true));
sb.setConfig("search.options", post.getBoolean("search.options", false));
+
+ sb.setConfig("search.text", post.getBoolean("search.text", false));
+ sb.setConfig("search.image", post.getBoolean("search.image", false));
+ sb.setConfig("search.audio", post.getBoolean("search.audio", false));
+ sb.setConfig("search.video", post.getBoolean("search.video", false));
+ sb.setConfig("search.app", post.getBoolean("search.app", false));
+
sb.setConfig("search.result.show.date", post.getBoolean("search.result.show.date", false));
sb.setConfig("search.result.show.size", post.getBoolean("search.result.show.size", false));
sb.setConfig("search.result.show.metadata", post.getBoolean("search.result.show.metadata", false));
sb.setConfig("search.result.show.parser", post.getBoolean("search.result.show.parser", false));
sb.setConfig("search.result.show.pictures", post.getBoolean("search.result.show.pictures", false));
+
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY, post.get("search.verify", "ifexist"));
sb.setConfig(SwitchboardConstants.SEARCH_VERIFY_DELETE, post.getBoolean("search.verify.delete", false));
// construct navigation String
@@ -103,6 +111,11 @@ public class ConfigPortal {
sb.setConfig("publicSearchpage", true);
sb.setConfig("search.navigation", "hosts,authors,namespace,topics");
sb.setConfig("search.options", true);
+ sb.setConfig("search.text", true);
+ sb.setConfig("search.image", true);
+ sb.setConfig("search.audio", false);
+ sb.setConfig("search.video", false);
+ sb.setConfig("search.app", false);
sb.setConfig("search.result.show.date", true);
sb.setConfig("search.result.show.size", true);
sb.setConfig("search.result.show.metadata", true);
@@ -122,6 +135,12 @@ public class ConfigPortal {
prop.put("publicSearchpage", sb.getConfigBool("publicSearchpage", false) ? 1 : 0);
prop.put("search.options", sb.getConfigBool("search.options", false) ? 1 : 0);
+ prop.put("search.text", sb.getConfigBool("search.text", false) ? 1 : 0);
+ prop.put("search.image", sb.getConfigBool("search.image", false) ? 1 : 0);
+ prop.put("search.audio", sb.getConfigBool("search.audio", false) ? 1 : 0);
+ prop.put("search.video", sb.getConfigBool("search.video", false) ? 1 : 0);
+ prop.put("search.app", sb.getConfigBool("search.app", false) ? 1 : 0);
+
prop.put("search.result.show.date", sb.getConfigBool("search.result.show.date", false) ? 1 : 0);
prop.put("search.result.show.size", sb.getConfigBool("search.result.show.size", false) ? 1 : 0);
prop.put("search.result.show.metadata", sb.getConfigBool("search.result.show.metadata", false) ? 1 : 0);