From d4942ad5e0c4878732714bbaf810184b6ad5e934 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sat, 28 Dec 2013 23:34:43 +0100 Subject: [PATCH] startRecord fix; this is not according to SRU definition because this states that the first record has number 0; but +1 is not consistent with other places where the number is used. --- htroot/yacysearch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index f2a577ef3..40c01c39a 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -839,7 +839,7 @@ public class yacysearch { ConcurrentLog.logException(e); } - prop.put("num-results_offset", startRecord == 0 ? 0 : startRecord + 1); + 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()));