【发布时间】:2011-11-05 02:27:49
【问题描述】:
跟随 Freebase docs on Envelope Parameters,运行
{
"cursor":true,
"query":[{
"type":"/music/album",
"artist":"The Police",
"name":null,
"limit":10
}]
}
results in error"Key cursor is a reserved word" 为@Domenic notes。
怎么了?
编辑 1
所以this query without a cursor works 但this one doesn't 因为cursor was a variable name not a string enclosed in quotes。
作为用户,输入损坏版本的"cursor" 是有意义的,因为the read parameter type table 同时具有query 和"cursor" 作为type: string,如果将query 括在引号中作为@ 则会出错987654335@
但是,即使将 "cursor" 括在引号中仍然不起作用:它会为每个查询生成相同的数据。
【问题讨论】:
-
您提供的链接指向查询编辑器中此查询的工作版本。您是在查询编辑器中还是通过直接调用 APIO 得到了这个错误?
-
两者都具有完全相同的查询,在发布时都没有工作。很高兴知道文档是正确的,并且它现在正在工作。如果再次发生,我会截屏。
-
Re: 编辑 1 - 第一个请求应该只是 mqlread?cursor=&query=[{...}]。这将在结果中返回一个查询值,然后您的下一个请求将类似于 mqlread?cursor=eNo10UlqAzEQBdALCVxz1e...&query=[{...}]