On Oct 12, 2012, at 3:22 PM, Yuriy Raskin wrote:
> could you please also clarify the following issue.
> For some MLSes when I am looping through the ResultSet I am getting
> the following error:
> <RETS-STATUS ReplyCode="20208" ReplyText="Maximum Records Exceeded" /
> >.
> Should I do pagination by myself? How can I get the max allows
> records?
There are a couple of ways to address this, it all depends on what the
server supports since they're not required to support all of this:
1. Do a search and just return the count of listings. Use LIMIT and
OFFSET to loop through the resultset until you've retrieved all your
records.
2. See if the server supports HasKeyIndex (RETS 1.7.2 and later) and
InKeyIndex. Check the metadata CLASS and TABLE for this. A server is
supposed to suspend limits when only the keys within InKeyIndex are
used in a query. This will allow you to retrieve all the key fields
for your query. Then again, you can loop through those results and
fetch the records up to the server specified LIMIT per query using the
keys in your query.
3. Partition the query using the ModTimeStamp. It may take a bit of
trial and error to figure out what range can be used in order to not
exceed the system imposed LIMIT.
Hope that helps.