diff --git a/htroot/js/yacyinteractive.js b/htroot/js/yacyinteractive.js index 21d2d21f1..f7d979175 100644 --- a/htroot/js/yacyinteractive.js +++ b/htroot/js/yacyinteractive.js @@ -23,7 +23,7 @@ function search(search, count, offset) { if (navhtml != null) navhtml.innerHTML = "
loading from local index...
"; query = search; maximumRecords = count; - if (count == "") maximumRecords = 1000; + if (count == "") maximumRecords = 100; startRecord = offset; if (offset == "") startRecord = 0; start = new Date(); @@ -100,16 +100,23 @@ function resultNavigation() { if (searchresult.length > totalResults) totalResults = searchresult.length; if (totalResults > 0) { html += "
" + searchresult.length + " results from a total of " + totalResults + " docs in index; search time: " + ((new Date()).getTime() - start.getTime()) + " milliseconds. "; - html += "
"; + html += "
"; + html += "
"; + if (maximumRecords != 10 && totalResults >= 10) html += ""; + if (maximumRecords != 100 && totalResults >= 100) html += ""; + if (maximumRecords != 1000 && totalResults >= 1000) html += ""; + if (totalResults <= 10000 && maximumRecords < totalResults) html += ""; + html += "
"; // for inline + html += ""; // for result statistic wrapper } else { if (query == "") { html += "please enter some search wordsor use the following predefined search queries:"; html += "find images: "; - html += "(png),"; - html += "(gif),"; - html += "(jpg)
"; + html += "(png),"; + html += "(gif),"; + html += "(jpg)
"; html += "list: "; - html += "recent pdf
"; + html += "recent pdf
"; //html += ""; } else { @@ -121,7 +128,7 @@ function resultNavigation() { var extnav = ""; for (var key in filetypes) { if (filetypes[key] > 0) { - extnav += "" + key + "(" + filetypes[key] + ")  "; + extnav += "" + key + "(" + filetypes[key] + ")  "; } } if (extnav.length > 0) { @@ -129,7 +136,7 @@ function resultNavigation() { } else { // check if there is a filetype constraint and offer a removal if (modifier != "") { - html += "remove the filter '" + modifier + "'"; + html += "remove the filter '" + modifier + "'"; } } @@ -138,7 +145,7 @@ function resultNavigation() { if (topics && topics.length > 0) { var topwords = ""; for (var i = 0; i < topics.elements.length; i++) { - topwords += "" + topics.elements[i].name + " "; + topwords += "" + topics.elements[i].name + " "; if (i > 10) break; } html += "   topwords: " + topwords; diff --git a/htroot/yacyinteractive.java b/htroot/yacyinteractive.java index cfc152bf5..d4a103deb 100644 --- a/htroot/yacyinteractive.java +++ b/htroot/yacyinteractive.java @@ -48,10 +48,10 @@ public class yacyinteractive { final String query = (post == null) ? "" : post.get("query", ""); final String startRecord = (post == null) ? "0" : post.get("startRecord", ""); - final String maximumRecords = (post == null) ? "1000" : post.get("maximumRecords", ""); + final String maximumRecords = (post == null) ? "10" : post.get("maximumRecords", ""); prop.putHTML("query", query); - prop.putHTML("startRecord", startRecord); - prop.putHTML("maximumRecords", maximumRecords); + prop.put("startRecord", startRecord); + prop.put("maximumRecords", maximumRecords); prop.putHTML("querys", query.replaceAll(" ", "+")); prop.put("serverlist", query.length() == 0 ? 1 : 0); prop.put("allowrealtime", sb.indexSegments.URLCount() < 100000 ? 1 : 0);