PDA

View Full Version : Inconsistent <opensearch:startIndex> values in XML output


rtollert
01-07-2009, 07:04 AM
I do an XML CGI search and get 152 results, paged into 10 results per call.

For the first page, opensearch:startIndex=1. For the second page, opensearch:startIndex=10 (!). For page N != 1, opensearch:startIndex= 10*N.

In other words, two different rules seem to be used for constructing startIndex. I've worked around this by:

startRow = startIndex;
if (startRow==1) startRow=0;


Which works. But clearly that's not ideal :)

wrensoft
01-07-2009, 01:41 PM
Yes, I agree this does seem a little strange. We should either number the XML results as,
0, 10, 20, 30...
or
1, 11, 21, 31...
and not
1, 10, 20, 30...

We have a closer look at fix it up for the next release.

Ray
01-13-2009, 12:12 AM
We have confirmed that this is a bug. The startIndex value returned in the XML results are off by 1 for page 2 or later.

It will be fixed in V6.0 build 1005.

rtollert
01-14-2009, 06:05 AM
Thanks for the fix - I've verified it in 1005.