Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

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.

orbiterd4942ad5e0c4
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()));