1

我只想从 Freebase 获得一个人可以拥有的不同别名。我的 PHP 查询是:

$query = array(
    array(
        'id' => NULL, 
        'alias' => NULL, 
        'name' => "Barack Obama", 
        'type' => "/people/person"
    )
);

结果是:

Array ( 
    [code] => /api/status/error 
    [messages] => Array ( 
        [0] => Array ( 
            [code] => /api/status/error/mql/type 
            [info] => Array ( 
                [expected_type] => /people/person 
                [property] => alias 
            ) 
            [message] => Type /people/person does not have property alias 
            [path] => 
            [query] => Array (
                [0] => Array (
                    [alias] => 
                    [error_inside] => . 
                    [id] => 
                    [name] => Barack Obama 
                    [type] => /people/person 
                ) 
            ) 
        ) 
    ) 
    [status] => 200 OK 
    [transaction_id] => cache;cache01.p01.sjc1:8101;2012-05-11T16:17:29Z;0082 
)

有人能帮我吗?

4

1 回答 1

1

该属性的全名是/common/topic/alias。除非该属性属于您正在使用的类型或者是 /type/object 的属性,否则您需要完全指定它。

您可以将类型更改为/common/topic(因为您似乎根本没有使用/people/person)或将属性更改为/common/topic/alias。

于 2012-05-12T02:40:00.807 回答