Ask Your Question
0

What criteria triggers "maxrows_reached: true"?

asked 2019-06-18 10:27:45 -0500

Hello and thank you for any help in advance!

I was curious if someone knew what objective criteria a RETS server uses to determine if a max number of rows for a search query result set has been reached. I'm assuming it is going to be based on the size of the the data returned, but I haven't found definitive information indicating one way or another.

For example, running a query of (L_ListingID=0+) matches 3400+ records, and in this situation maxrows_reached is true and returned_results_count is limited to 2500 records. However, when I run the same query but with an option of 'Select' => 'L_DisplayId', only asking for the MLS number, all 3400+ records are returned and maxrows_reached is false. This leads me to believe that the size of the data returned had not hit some limit.

If this is the case, is there some mechanism/standard that we can use when coding, knowing in some situations we'll have to build in batching/paging/an offset, but in other situations, we can have confidence that a search will not hit a definitive data limit that will trigger maxrows_reached: true?

Thanks again for any help! If my question needs more clarification, just let me know.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-18 11:31:21 -0500

The limits are set based on the user's account profile.
Limits can be set and be different for individual classes within each resource.
Fields flagged as inkeyindex in the metadata can be requested bypassing the limits.
That is why if you request only L_ListingID and L_DisplayId there isn't a limit applied.

When I pull from a client, I generally use Offset and Limit functionality to pull batches.
Checking the actual number of records returned in the first batch.
Then adjusting the limit for the next and subsequent batches accordingly.
For example: Offset=1, Limit=2500
Number of records returned: 2000
Next batch: Offset=2001, Limit=2000, etc

edit flag offensive delete link more

Comments

This is really great info to know, @bwolven. I was unaware that InKeyIndex behaved that way. This is the solution I'm looking for. So would it be safe to say that any query that involves at least one field where InKeyIndex: 0 is going to be subject to maxrows_reached?

balefireagency gravatar imagebalefireagency ( 2019-06-18 11:49:58 -0500 )edit

Correct. If only InKeyIndex fields are specified in Select and Limit=NONE, the limit is suspended.
Use the InKeyIndex field pull once or twice a day to get key values to determine removals from feed.

bwolven gravatar imagebwolven ( 2019-06-18 11:51:58 -0500 )edit

Also, when doing batching, make sure to check if any records are returned in the batch.
It is possible for the record count to change while you are pulling records.

bwolven gravatar imagebwolven ( 2019-06-18 11:56:52 -0500 )edit

Great tips, @bwolven. Much appreciated and thank you!

balefireagency gravatar imagebalefireagency ( 2019-06-18 12:04:30 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-06-18 10:27:45 -0500

Seen: 33 times

Last updated: Jun 18