From cabe0943cd813066a1df92f7d1581724b117a357 Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 4 Jan 2014 17:14:10 +0100 Subject: [PATCH] fix opensearch resultcount in yacysearch.rss see merge request https://gitorious.org/yacy/rc1/merge_requests/24 use result count in searchtrailer.xml which is on p2p search more accurate (timing) --- htroot/yacysearch.java | 2 +- htroot/yacysearch.rss | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 1953e5f86..2e8992814 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -841,7 +841,7 @@ public class yacysearch { prop.put("num-results_offset", startRecord); prop.put("num-results_itemscount", Formatter.number(startRecord + theSearch.query.itemsPerPage > theSearch.getResultCount() ? startRecord + theSearch.getResultCount() % theSearch.query.itemsPerPage : startRecord + theSearch.query.itemsPerPage, true)); prop.put("num-results_itemsPerPage", Formatter.number(itemsPerPage)); - prop.put("num-results_totalcount", Formatter.number(theSearch.getResultCount())); + prop.put("num-results_totalcount", Formatter.number(theSearch.getResultCount())); // also in yacyserchtrailer (hint: timing in p2p search ) prop.put("num-results_globalresults", global && (indexReceiveGranted || clustersearch) ? "1" : "0"); prop.put("num-results_globalresults_localResourceSize", Formatter.number(theSearch.local_rwi_stored.get() + theSearch.local_solr_stored.get(), true)); prop.put("num-results_globalresults_remoteResourceSize", Formatter.number(theSearch.remote_rwi_stored.get() + theSearch.remote_solr_stored.get(), true)); diff --git a/htroot/yacysearch.rss b/htroot/yacysearch.rss index 539ca1d2a..2a8a3a8f1 100644 --- a/htroot/yacysearch.rss +++ b/htroot/yacysearch.rss @@ -12,13 +12,12 @@ #[promoteSearchPageGreeting]#: #[rss_query]# Search for #[rss_query]# - #[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[resource]#&contentdom=#[contentdom]#&verify=#[verify]# + #[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[resource]#&contentdom=#[contentdom]#&verify=#[search.verify]# #[rssYacyImageURL]# Search for #[rss_query]# - #[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[resource]#&contentdom=#[contentdom]#&verify=#[verify]# + #[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[resource]#&contentdom=#[contentdom]#&verify=#[search.verify]# - #[num-results_totalcount]# #[num-results_offset]# #[num-results_itemsPerPage]#