Offset and Count attributes of a SourceRequest
Hi there! Thanks for the great service, enjoying it immensely.
I've found Offset and Count attributes to be useful in displaying results above and beyond the basic 50. As I could establish, Offset let's you receive results on a search query starting from a particular position.
However my experience with Offset was very irregular - in some cases it worked flawlesly. But sometimes the order of results with Offset 0 and Offset 1 was different - in the latter case, it did start from the second position but all was messed up.
Is this a known issue, or am I simply using it incorrectly?
Thanks and regards.
Paul
Seth Demsey et al,
I also have questions about the API search results. I often get 1 fewer result than I ask for -- if I ask for 20, about half the time I get 19 results. (My script then asks for 21 to get back the desired 20.)
Am I doing something wrong or is this a bug?
The other thing, and this may not be a bug, if I perform an API search a few times in succession, each instance returns a different result set. I would expect the results to stay the same from minute to minute for the top 10 or 20 results (even if they change tomorrow.) Anything going on here?
Thanks!
Richard
it's not officially a bug, duplicates have been removed, which is why when you ask for 50, you get 48 or 49...my question is, where do I start the next query? 51 or 49...
To get the next set of results, start with the Offset equal to the Count and follow with Count * (Your Page Number) for subsequent results. For example, to get ten results starting at Offset 0, make one request with Count = 10. To get the second ten results (11-20), set Offset to 10 and Count to 10. Set Offset to 20 for the third set (21-30) and so on. Duplicate removal happens within the result set, so if you ask for 10 and get only 9 it doesn't affect paging. I hope this helps!