November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Jacob -- thanks for the descriptive question. This is by design. I suspect the confusion can be attributed to ambiguous naming of the property PageOffset, which could be interpreted as an index of pages rather than an index to begin the page.
The offset is a zero-based index indicating the point in the result set from which to begin returning results.
So, in your first query (Size = 2, Offset = 0), you would receive:
123 | 456 | 789 | 101112 | 131415 |
0 | 1 | 2 | 3 | 4 |
Your second query (Size = 2, Offset = 1), delivers:
123 | 456 | 789 | 101112 | 131415 |
0 | 1 | 2 | 3 | 4 |
To paginate in the manner that I imagine you're expecting, you'll want to add the page size to the previous offset to get the new one.
Size = 2, Offset = 0 (2 results)
123 | 456 | 789 | 101112 | 131415 |
0 | 1 | 2 | 3 | 4 |
Size = 2, Offset = 2 (2 results)
123 | 456 | 789 | 101112 | 131415 |
0 | 1 | 2 | 3 | 4 |
Size = 2, Offset = 4 (1 result)
123 | 456 | 789 | 101112 | 131415 |
0 | 1 | 2 | 3 | 4 |
Hope this helps!
If I have a criteria of:
Call the service:
It works, no issues, 2 Results, Total Matching 5.
And as an example lets say it returns
results.Results[0].Data.Id = 123
results.Results[1].Data.Id = 456
All fine.
Now if I paginate:
Again I get 2 more results, but the issue I am seeing is that:
results.Results[0].Data.Id = 456
results.Results[1].Data.Id = 789
As you can see the results returned after the pagination includes the last previous result.
Is this by design or is this a bug?
Thanks