[Developers] Question on compound data types
Alec Flett
alecf at metaweb.com
Fri Sep 28 19:40:50 UTC 2007
You can find out about compound data types by looking at two properties:
On the type:
"/freebase/type_hints/mediator" - determines if the type itself is a
mediating object, rather than a full topic (true means it's a mediating
object)
On each property of the mediator:
"/freebase/property_hints/disambiguator" - determines, at least from the
perspective of the freebase.com UI, if a property is signifigant enough
to warrant display in the UI.
Try this query in the query editor:
{
"query":[{
"film":[{
"id":null,
"type":{
"/freebase/type_hints/mediator":null,
"id":null,
"properties":[{
"/freebase/property_hints/disambiguator":null,
"id":null
}]
}
}],
"id":"/topic/en/david_bowie",
"type":"/film/actor"
}]
}
Note that /film/performance/actor, /film/performance/film,
/film/performance/special_performance_type, and
/film/performance/character are all disambiguators. This is what makes
all 4 show up on the topic page for david bowie.. (and actor is excluded
on David Bowie's own page, because that's who you're editing!)
Note that this whole mechanism is likely to change. This is kind of our
first cut at representing these complex relationships, and we'll have a
cleaner solution down the road.
Alec
Jim Weaver wrote:
>
> It seems that my query for "everything" related to an object isn't
> complete yet. Here it is in its current form:
>
>
>
> {
>
> "query":[{
>
> "/type/reflect/any_master":[{
>
> "id":null,
>
> "link":{
>
> "master_property":{
>
> "id":null,
>
> "name":null
>
> }
>
> },
>
> "name":null,
>
> "optional":true,
>
> "type":[]
>
> }],
>
> "/type/reflect/any_reverse":[{
>
> "id":null,
>
> "link":{
>
> "master_property":{
>
> "reverse_property":{
>
> "id":null,
>
> "name":null
>
> }
>
> }
>
> },
>
> "name":null,
>
> "optional":true,
>
> "type":[]
>
> }],
>
> "/type/reflect/any_value":[{
>
> "link":{
>
> "master_property":{
>
> "id":null,
>
> "name":null
>
> }
>
> },
>
> "optional":true,
>
> "type":null,
>
> "value":null
>
> }],
>
> "id":"#9202a8c04000641f8000000005bcc861",
>
> "name":null
>
> }]
>
> }
>
>
>
> The problem is that when running this on Davy Jones (the id shown in
> the query), I'd like to navigate through the compound data type (in
> this case /music/group_membership) to get the names of the related
> /music/musical_group instances. This leads me to the question: What
> can I add to the query that identifies all compound data types and
> traverses through the associative relationship to retrieve the name of
> the object on the other side?
>
>
>
> Thanks,
>
> Jim Weaver
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20070928/f632086b/attachment-0001.htm
More information about the Developers
mailing list