看来我只能使用新的 freebase MQL 读取 api 进行唯一查询(即在查询中包含实体 id):
以下对 id 和 type 的搜索:
https://www.googleapis.com/freebase/v1/mqlread?query={"name":null,"id":"/en/bob_dylan","type":"/people/person"}
并成功返回:
{
"result": {
"type": "/people/person",
"id": "/en/bob_dylan",
"name": "Bob Dylan"
}
}
以下仅使用类型搜索:
https://www.googleapis.com/freebase/v1/mqlread?query={"name":null,"type":"/people/person"}
或者
https://www.googleapis.com/freebase/v1/mqlread?query={"name":[],"type":"/people/person"}
并返回以下错误:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badRequest",
"message": "Unique query may have at most one result. Got 100"
}
],
"code": 400,
"message": "Unique query may have at most one result. Got 100"
}
}
我希望它会返回一个人名列表