RETS数据获取问题
我正在开发一个房地产网站,该网站使用 RETS 服务将数据传输到我的本地服务器。
但我这里有一个小问题,我可以从 RETS 中获取数据,该数据在 RETS 数据库中大约有 3lacks 记录,但我没有找到方法,如何一次获取一堆 50k 的所有记录?
我在 RETS 上没有找到任何“LIMIT”关键字。那么如何在没有“LIMIT”的情况下一次获取 50k 条记录?
请帮我。
I am working on one real estate website which is Using RETS service to get the data to my local server.
but I have one little bit problem here,I can fetch data from RETS which is having about 3lacks record in RETS Database but I didn't find the way,How can I fetch that all records in bunch of 50k at a time ?
I didn't find any 'LIMIT' keyword on RETS.so how can I fetch without 'LIMIT' 50k records at a time?
Please help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
RETS 并不是一个真正的标准。它更类似于伪标准。它松散地定义了描述房地产列表的 XML 模式。
在 1.x 版本中,“标准”由 DTD 文档组成。在2.x中,“标准”使用XSD文档来描述列表。
http://www.rets.org/documentation
然而,在实践中,几乎没有一致性实施者。在与数百家“符合 RETS 标准”的服务提供商建立联系后,我确信其中没有一家是与其他服务提供商相同的。
而且,2.x的“标准”已经3年没有改变了。这是对标准的一次未经维护、草率的尝试。它(RETS)经常被非技术人员用作商业流行语。事实上,这只是在 XML 中对房地产列表进行建模的任意尝试。
尝试向特定实施者询问他们的文档。通常,他们没有。因此,向首席开发人员发送电子邮件通常很有帮助。有时他们会提供 WSDL 来概述支持的调用。通常,WSDL 与实际服务不一致,所以要小心。
至于您的具体问题,请尝试缓存结果。通常,对 RETS 调用使用限制是直接依赖的标志。随着对您的服务的请求增加,您的服务给他们带来的负担将会中断(并且不会受到赞赏)。此外,如果他们的服务中断(即使是暂时的),您的服务也将被中断。最重要的是,它会使对页面的实时请求非常非常慢(特别是如果他们的系统当时很慢)。由于担心数据过时,列表通常不会频繁更改,因此缓存长达 1 小时是完全可以接受的。
祝你好运!
RETS is not really much of a standard. It's more closely resembles a pseudo standard. It loosely defines an XML schema that describes real estate listings.
In version 1.x, the "standard" was composed of DTD documents. In 2.x, the "standard" uses XSD documents to describe the list.
http://www.rets.org/documentation
However, in practice, there is almost no consistency amongst implementers. Having connected to hundreds of "RETS Compliant" service providers, I'm convinced that not one of them is like any other one.
Furthermore, the 2.x "standard" has not changed in 3 years. It's an unmaintained, sloppy attempt at a standard. It (RETS) is often used as a business buzz word by non-technical people. In reality, it's just an arbitrary attempt at modeling real estate listing in XML.
Try asking the specific implementer for their documentation. Often, they don't have any. So, emailing the lead developer has frequently been helpful. Sometimes they'll provide a WSDL which will outline the supported calls. Often, the WSDL doesn't coincide with the actual service, so beware.
As for your specific question, try caching the results. Usually, the use of a limit on a RETS call is a sign of a direct dependency. As requests for your service increase, the load that your service puts on theirs will break (and not be appreciated). Also, if their service goes down (even temporarily), yours will be interrupted as well. Most importantly, it will make the live requests to your pages really, really slow (especially if their system is slow at the time). The listings usually don't change frequently enough for worries about stale data, so caching up to and hour is pretty acceptable.
Best of luck!
libRets 支持生成具有获取限制的查询:
http ://www.crt.realtors.org/projects/rets/librets/documentation/api/classlibrets_1_1_search_request.html
但最后我知道:我记得 Intereality 公司要么被忽略,要么完全没有提供与 RETS 的完全兼容性。了解您与它们打交道的最快方法是也考虑将表字段的所有“系统”名称设为数字。
如果幸运的话,您正在使用 Rapattoni 支持的服务器,并且他们确实提供了规格。兼容的服务器。
最后一点,我一辈子都记不起它的名字,但我曾经使用基于 Java 的免费 RETS 工具来构建有效的查询(包括偏移/限制子句),这使得构建自动获取器变得更容易客户的批处理系统。
libRets provides support for generating a query with fetch limits:
http://www.crt.realtors.org/projects/rets/librets/documentation/api/classlibrets_1_1_search_request.html
But last I knew: I remember the company Intereality either ignored or outright didn't provide complete compatibility to RETS. Quickest way to know your dealing with them is that also thought making all "System" name's for table fields numeric.
If you're lucky, you're using a Rapattoni backed server and they do provide spec. compatible servers.
Last point, I can't for the life of me remember it's name, but I used to use a free Java based RETS tool to build valid queries ( included offset/limit clauses ) and that made it a tad easier to build automated fetchers for a client's batch processing system.
在 RETS 中,如果计数超过限制,那么我们可以使用批量形式下载,或者我们可以在下载时使用正则表达式删除该限制
解决问题的最佳方法将数据计数以小下载单位划分,同时我们必须考虑下载限制 划分字段MLS/IDX 中的那个我建议修改日期和上市日期
IN RETS if Count More Than limit then We can download using Batch form or we can remove that Limit using regex while downloading
Best way to solve Problem divide Data Count in small unit of download and while we have to consider download limit in mind Field for Divide that one in MLS/IDX I Suggest Modification Date and ListingDate