[libRETS-users] RE: libRETS-users Specific Order
Russ Perna
russ.perna at prudentialrand.com
Mon Jan 15 16:51:19 CST 2007
Tony,
That works, thanks a lot. In the case of the (MLNumber=1+), it will usually
be too many records, I was just using it for example.
Thanks again,
Russ
-----Original Message-----
From: librets-users-bounces at crt.realtors.org
[mailto:librets-users-bounces at crt.realtors.org] On Behalf Of Tony Russo
Sent: Monday, January 15, 2007 5:38 PM
To: 'For discussion and help for and by the users of the libRETS C++library'
Subject: RE: [libRETS-users] RE: libRETS-users Specific Order
Russ,
Seems like the first query is looking for listings where the MLS number is
both 2615240 AND 2617678 AND modified since 2007-01-13. Likely not
returning anything because you're query is asking for records matching both
MLS numbers which is not possible.
If you wanted MLS number 2615240 OR 2617678 AND only modified since
2007-01-13 try something like (MLSNumber=|2615240,2617678),
(LastModifiedDateTime=2007-01-13+).
If your intent was to return the 2,438 inclusive MLS numbers between 2615240
and 2617678 you might try something like this (MLNumber=2615240-2617678) if
MLNumber is numeric (not character), indexed, and 2,438 is less than the
server limit.
The 2nd query may hit the server limit depending on the number of listings
modified since 2007-01-13. You might need to limit number of days to
something like 10 then try something like this
(LastModifiedDateTime=2007-01-13-2007-01-23).
Tony
-----Original Message-----
From: librets-users-bounces at crt.realtors.org
[mailto:librets-users-bounces at crt.realtors.org] On Behalf Of Russ Perna
Sent: Monday, January 15, 2007 4:47 PM
To: 'For discussion and help for and by the users of the libRETS C++library'
Subject: RE: [libRETS-users] RE: libRETS-users Specific Order
Tony,
Thanks for the heads up, that is the route that I am taking. I have one more
question about this.
If I were to query like this, the query never returns (or at least I'm not
willing to wait that long):
SearchRequest searchRequest = session.CreateSearchRequest("Property",
"ResidentialProperty", "(MLNumber=2615240), (MLNumber=2617678),
(LastModifiedDateTime=2007-01-13T00:00:00+)");
However, if I query like this everything returns quickly:
SearchRequest searchRequest = session.CreateSearchRequest("Property",
"ResidentialProperty", "(MLNumber=1+),
(LastModifiedDateTime=2007-01-13T00:00:00+)");
Can you tell me if I am querying the MLS numbers incorrectly?
Thanks,
Russ
-----Original Message-----
From: librets-users-bounces at crt.realtors.org
[mailto:librets-users-bounces at crt.realtors.org] On Behalf Of Tony Russo
Sent: Monday, January 15, 2007 12:49 PM
To: librets-users at crt.realtors.org
Subject: [libRETS-users] RE: libRETS-users Specific Order
Hi Russ,
Ouch Limit, Offset, and Order are not guaranteed but you might try something
like this using a local mls_index table:
1.) Create a local temporary mls_index table with 4 fields, MLSNum,
PropType, ListStatus, and ModifedDate fields.
2.) Create a RETS Search by Property Class for MLSNum, ListStatus,
ModifiedDate and limit the query to something that will ensure the results
returned fall within the imposed server limits. Try using BETWEEN on fields
like ModifedDate, EntryDate, or MLSnum in your query that would allow you to
control the number of records returned per search.
3.) Loop using the Search from step 2, saving the MLSNum, PropType,
ListStatus, and ModifiedDate into your local mls_index table.
4.) Upon completion of step 3 you should now have a complete index of all
listings on the MLS.
5.) You can query your local mls_index table any way you like using your own
Limit, Offset or Order to build a set of RETS queries by MLSnum that will
always return the number of listings that fall with the server limits.
5.) Also listings in your local MLS table not in this mls_index are no
longer available (deleted or archived) on the server so you can use this to
keep your local MLS table updated.
Hope this helps.
Tony
-----Original Message-----
From: librets-users-bounces at crt.realtors.org
[mailto:librets-users-bounces at crt.realtors.org] On Behalf Of Russ Perna
Sent: Monday, January 15, 2007 11:38 AM
To: 'For discussion and help for and by the users of the libRETS C++library'
Subject: RE: [libRETS-users] Specific Order
When I asked the MLS, I got a vague answer to the question, and I don't
think they actually knew.
If you can't guarantee the sort order, can anyone tell me how they download
their data when the MLS limits the download size?
Thanks,
Russ
Russ Perna
--
Webmaster
Prudential Rand Realty
http://www.prudentialrand.com
845.825.8036
_______________________________________________
libRETS-users mailing list
libRETS-users at crt.realtors.org
http://mail.crt.realtors.org/mailman/listinfo/librets-users
_______________________________________________
libRETS-users mailing list
libRETS-users at crt.realtors.org
http://mail.crt.realtors.org/mailman/listinfo/librets-users
_______________________________________________
libRETS-users mailing list
libRETS-users at crt.realtors.org
http://mail.crt.realtors.org/mailman/listinfo/librets-users
More information about the libRETS-users
mailing list