diff --git a/defaults/yacy.init b/defaults/yacy.init index da362baae..4ef60b139 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -693,6 +693,9 @@ indexer.threads = 1 # maximum size of stacker queue stacker.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 = false diff --git a/htroot/index.html b/htroot/index.html index c25769966..40600bfe4 100644 --- a/htroot/index.html +++ b/htroot/index.html @@ -37,7 +37,7 @@ #(searchoptions)# - + diff --git a/htroot/index.java b/htroot/index.java index 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.java index 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 */