|
|
|
@ -20,7 +20,7 @@ public class yacysearchlatestinfo {
|
|
|
|
|
// the event does not exist.
|
|
|
|
|
// to avoid missing patterns, we return dummy values
|
|
|
|
|
prop.put("offset", 0);
|
|
|
|
|
prop.put("itemscount", -1);
|
|
|
|
|
prop.put("itemscount", 0);
|
|
|
|
|
prop.put("itemsperpage", 10);
|
|
|
|
|
prop.put("totalcount", 0);
|
|
|
|
|
prop.put("localResourceSize", 0);
|
|
|
|
@ -36,7 +36,7 @@ public class yacysearchlatestinfo {
|
|
|
|
|
final int totalcount = theSearch.getRankingResult().getLocalIndexCount() - theSearch.getRankingResult().getMissCount() - theSearch.getRankingResult().getSortOutCount() + theSearch.getRankingResult().getRemoteIndexCount();
|
|
|
|
|
final int offset = theQuery.neededResults() - theQuery.displayResults() + 1;
|
|
|
|
|
prop.put("offset", offset);
|
|
|
|
|
prop.put("itemscount", -1);
|
|
|
|
|
prop.put("itemscount",Formatter.number(offset + theSearch.getQuery().itemsPerPage >= totalcount ? offset + totalcount % theSearch.getQuery().itemsPerPage - 1 : offset + theSearch.getQuery().itemsPerPage - 1));
|
|
|
|
|
prop.put("itemsperpage", theSearch.getQuery().itemsPerPage);
|
|
|
|
|
prop.put("totalcount", Formatter.number(totalcount, true));
|
|
|
|
|
prop.put("localResourceSize", Formatter.number(theSearch.getRankingResult().getLocalIndexCount(), true));
|
|
|
|
@ -44,6 +44,7 @@ public class yacysearchlatestinfo {
|
|
|
|
|
prop.put("remoteResourceSize", Formatter.number(theSearch.getRankingResult().getRemoteResourceSize(), true));
|
|
|
|
|
prop.put("remoteIndexCount", Formatter.number(theSearch.getRankingResult().getRemoteIndexCount(), true));
|
|
|
|
|
prop.put("remotePeerCount", Formatter.number(theSearch.getRankingResult().getRemotePeerCount(), true));
|
|
|
|
|
prop.putJSON("navurlBase", QueryParams.navurlBase("html", theQuery, null, theQuery.urlMask.toString(), theQuery.navigators).toString());
|
|
|
|
|
|
|
|
|
|
return prop;
|
|
|
|
|
}
|
|
|
|
|