Freebase MQL 过滤器的值 == null?
可以获取特定字段中值为空的所有三元组吗? 所有 date_of_birth 的人都等于 null?
[
"type": "/people/person",
"date_of_birth":null,
"name":null
]
Can get all triples with value null in specific field?
All people with date_of_birth equal null?
[
"type": "/people/person",
"date_of_birth":null,
"name":null
]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要使用 "optional":"forbidden" 指令:(
我添加了
"id":null
以便 查询编辑器 提供可点击的链接)请注意,查询有一个默认的 < code>"limit":100, 如果您想要更多结果,请添加显式限制子句。如果超时,则您需要使用 MQL 游标。
You need to use "optional":"forbidden" directive:
(I added
"id":null
so that the Query Editor gives clickable links)Note that query has a default
"limit":100,
if you want more results then add an explicit limit clause. If that times out, then you'll need to use a MQL cursor.如果您需要处理大量结果,未记录的信封参数“page”提供了比“cursor”更大的灵活性,允许您向前、向后或随机访问页面,而不是像使用光标。
“可选”:“禁止”子句是许多有用查询的关键。 “!everything”==“nothing”等价只是最常见的一种。
汤姆
If you need to deal with lots of results, the undocumented envelope parameter "page" provides more flexibility than "cursor", allowing you to move forward, back, or access a page at random, as opposed to just going forward like you can with the cursor.
The "optional": "forbidden" clause is the key to lots of useful queries. The "!everything" == "nothing" equivalency is just one of the most common ones.
Tom