YQL 示例查询最多返回 260 个结果
我正在跟踪 YQL 示例查询,
select * from local.search(500) where query="sushi" and location="san francisco, ca"
但我得到的最大计数是 260,而不是 500。我还尝试在“where”和不同的关键字之后使用限制 500,总是得到最大 260 个结果。你如何增加它?
I am following YQL sample query
select * from local.search(500) where query="sushi" and location="san francisco, ca"
but I get 260 max count instead of 500. I tried also to use limit 500 after 'where' and different keywords, always get maximum 260 results. How do you increase it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
local.search
表使用的底层 API (Yahoo ! 本地搜索 Web 服务)对返回的结果数量有限制。results
参数(“每页”结果数)的最大值为 20。start
参数(开始的偏移量)的最大值为250
。由于您请求前 500 个结果,YQL 对本地搜索 API 进行多次查询,一次返回 20 个结果。因此
start
值为1
、21
、41
、...241
。正如您所看到的,这会返回 260 个结果。由于 YQL 查询要求更多结果,因此会尝试下一个
start
值 (261
),该值超出了允许的范围,因此底层服务返回错误(带有消息“无效值:start (261) 必须介于 1 和 250" 之间。如果您在 YQL 控制台中打开“诊断”,您将看到返回“错误请求”。您对查询所做的任何操作都不会返回比基础服务允许的更多结果。
The underlying API that the
local.search
table uses (Yahoo! Local Search Web Service) has restrictions on the number of results returned.The
results
parameter (the number of results "per page") has a maximum value of 20.The
start
parameter (the offset at which to start) has a maximum value of250
.Since you ask for the first 500 results, YQL makes multiple queries against the Local Search API returning 20 results at a time. Therefore the
start
values are1
,21
,41
, ...241
. This brings back 260 results, as you have seen.Since the YQL query asks for more results, the next
start
value is tried (261
) which is beyond the allowed range so the underlying service returns an error (with the message "invalid value: start (261) must be between 1 and 250"). If you turn on "diagnostics" in the YQL console, you will see the "Bad Request" being returned.Nothing you do to the query will bring back more results than the underlying service allows.
我发现,我缺少寻呼号码,所以 0++ 就可以了
I figured out, I was missing paging number, so 0++ will work