[Developers] /type/link queries and reverses

Barak Michener barak at metaweb.com
Fri Dec 19 23:27:46 UTC 2008


If you must query using the reverse property, you can also do this:

[
  {
    "master_property" : {
      "reverse_property" : "/people/person/spouse_s"
    },
    "source" : {},
    "target" : {
      "id" : "/en/mel_gibson",
      "type" : "/people/person"
    },
    "type" : "/type/link"
  }
]

But yeah,  /type/link queries are very specific about the 
incoming/outgoing direction.


Scott Meyer wrote:
> augusto callejas wrote:
>   
>> hi-
>>
>> i don't understand why i can't query for links
>> using one property, but i can for its reverse property.
>> in the example below, i'm querying for spouse_s links
>> going out from mel gibson, and in the second query
>> i'm querying for /people/marriage/spouse links going
>> into mel gibson.
>>     
>
> You've run into a limitation of /type/link: it only works
> with master properties, hence the "master_property" keyword.
>
>   
>> ===
>> [
>>   {
>>     "master_property" : "/people/person/spouse_s",
>>     "source" : {
>>       "id" : "/en/mel_gibson",
>>       "type" : "/people/person"
>>     },
>>     "type" : "/type/link"
>>   }
>> ]
>> ---
>> []
>> ===
>>     
>
> In order for this to work we'd need to make MQL smarter
> and have a keyword named "property" or add "reverse_property".
>
> I've filed a bug.
>
> -Scott
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>   



More information about the Developers mailing list