Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
you can define your default number of search results displayed by search.items this applies only to requests through the classic-style page
lotus13fb84ab8183
diff --git a/defaults/yacy.init b/defaults/yacy.initindex da362baae..4ef60b139 100644--- a/defaults/yacy.init+++ b/defaults/yacy.init@@ -693,6 +693,9 @@ indexer.threads = 1# maximum size of stacker queuestacker.slots = 2000+# number of search results displayed by default+search.items = 10+# specifies if yacy should set it's own referer if no referer URL# was set by the client.useYacyReferer = falsediff --git a/htroot/index.html b/htroot/index.htmlindex c25769966..40600bfe4 100644--- a/htroot/index.html+++ b/htroot/index.html@@ -37,7 +37,7 @@<input type="radio" id="app" name="contentdom" value="app" #(contentdomCheckApp)#::checked="checked"#(/contentdomCheckApp)# /><label for="app">Applications</label></div>#(searchoptions)#- <input type="hidden" name="maximumRecords" value="10" />+ <input type="hidden" name="maximumRecords" value="#[maximumRecords]#" /><input type="hidden" name="startRecord" value="0" /><input type="hidden" name="resource" value="global" /><input type="hidden" name="urlmaskfilter" value=".*" />diff --git a/htroot/index.java b/htroot/index.javaindex a06c7e5e3..ae68473fc 100644--- a/htroot/index.java+++ b/htroot/index.java@@ -67,6 +67,7 @@ public class index {final int searchoptions = (post == null) ? 0 : post.getInt("searchoptions", 0);final String former = (post == null) ? "" : post.get("former", "");final int count = Math.min(100, (post == null) ? 10 : post.getInt("count", 10));+ final int maximumRecords = Integer.parseInt((sb.getConfig(plasmaSwitchboardConstants.DEFAULT_SEARCHITEMS, "10")));final String urlmaskfilter = (post == null) ? ".*" : post.get("urlmaskfilter", ".*");final String prefermaskfilter = (post == null) ? "" : post.get("prefermaskfilter", "");final String constraint = (post == null) ? "" : post.get("constraint", "");@@ -98,6 +99,7 @@ public class index {prop.put("combine", "0");prop.put("resultbottomline", "0");prop.put("searchoptions", searchoptions);+ prop.put("searchoptions_maximumRecords", maximumRecords);prop.put("searchoptions_count-10", (count == 10) ? "1" : "0");prop.put("searchoptions_count-50", (count == 50) ? "1" : "0");prop.put("searchoptions_count-100", (count == 100) ? "1" : "0");diff --git a/source/de/anomic/plasma/plasmaSwitchboardConstants.java b/source/de/anomic/plasma/plasmaSwitchboardConstants.javaindex 3a2b39015..3ba044963 100644--- a/source/de/anomic/plasma/plasmaSwitchboardConstants.java+++ b/source/de/anomic/plasma/plasmaSwitchboardConstants.java@@ -517,6 +517,8 @@ public final class plasmaSwitchboardConstants {public static final String UPNP_ENABLED = "upnp.enabled";+ public static final String DEFAULT_SEARCHITEMS = "search.items";+/*** system tray*/