summaryrefslogtreecommitdiff
path: root/htroot/js
diff options
context:
space:
mode:
authorMichael Peter Christen <mc@yacy.net>2013-02-26 17:16:31 +0100
committerMichael Peter Christen <mc@yacy.net>2013-02-26 17:16:31 +0100
commitc95a84103a4545e3656c90fc51e210ef2eb4bcd5 (patch)
treec472f810333757350bf4d858f441484f837d472a /htroot/js
parent35fa718b77ad415fe8c9b02201373994ef45aed6 (diff)
complete redesign of search process:
- removed 'worker' processes - no internal time-out behaviour: methods either are successful or return null - waiting is only done on top-level - removed snippet-production; this is replaced by solr snippets - removed statistics based on solr size queries (they had been VERY long); the statistics (like suggestions or tag cloud) are now again based on the old but very fast RWI index. In portal or intranet mode the RWI index is usually switched off; if you like to have statistics again then you must switch on the rwis again in this mode. - fixed many bugs regarding correct page counter
Diffstat (limited to 'htroot/js')
-rw-r--r--htroot/js/yacysearch.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js
index df327002f..5c467c27f 100644
--- a/htroot/js/yacysearch.js
+++ b/htroot/js/yacysearch.js
@@ -75,11 +75,10 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
if (offset >= 0) document.getElementById("resultsOffset").firstChild.nodeValue = offset;
if (itemscount >= 0) document.getElementById("itemscount").firstChild.nodeValue = itemscount;
document.getElementById("totalcount").firstChild.nodeValue = totalcount;
- if (document.getElementById("localResourceSize") == null) return;
- document.getElementById("localResourceSize").firstChild.nodeValue = localResourceSize;
- document.getElementById("remoteResourceSize").firstChild.nodeValue = remoteResourceSize;
- document.getElementById("remoteIndexCount").firstChild.nodeValue = remoteIndexCount;
- document.getElementById("remotePeerCount").firstChild.nodeValue = remotePeerCount;
+ if (document.getElementById("localResourceSize") != null) document.getElementById("localResourceSize").firstChild.nodeValue = localResourceSize;
+ if (document.getElementById("remoteResourceSize") != null) document.getElementById("remoteResourceSize").firstChild.nodeValue = remoteResourceSize;
+ if (document.getElementById("remoteIndexCount") != null) document.getElementById("remoteIndexCount").firstChild.nodeValue = remoteIndexCount;
+ if (document.getElementById("remotePeerCount") != null) document.getElementById("remotePeerCount").firstChild.nodeValue = remotePeerCount;
document.getElementById("resNav").firstChild.nodeValue = "X";
// compose page navigation
@@ -93,7 +92,7 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
resnav += ("\"><img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" /></a>&nbsp;");
}
- numberofpages = Math.min(10, 1 + ((totalcount - 1) / itemsperpage));
+ numberofpages = Math.floor(Math.min(10, 1 + ((totalcount - 1) / itemsperpage)));
if (!numberofpages) numberofpages = 10;
for (i = 0; i < numberofpages; i++) {
if (i == thispage) {