[Developers] invert and sort by mediated property values
Jack Alves
jack.alves at gmail.com
Sat May 30 00:39:14 UTC 2009
I have a very explicit query I would like to invert. Below is a small sample
of the query. The general pattern is to query mediator properties, sort by a
common value that is in all link types, and return the property name, and
topics connected to the mediator instances.
Here's what I want to do in plain language: find all connections to Nicole
Kidman that are in the popstra domain and sort the whole list by a relevance
integer value common to all connections. Return the name of the connection,
and info about the mediator topics including name, id, image, and common
relevance values.
The overall objective is to get a list sorted first by relevance of mediator
connections, then by relevance of topics connected to mediators.
SAMPLE OF CURRENT QUERY
[{
"religion": [{
"type": "/base/popstra/religion_choice",
"optional": true,
"religion": [{
"id": null,
"name": null
}],
"/common/topic/image": {
"id": null,
"limit": 1,
"optional": true
},
"/base/popstra/sww_base/heat": null,
"/base/popstra/sww_base/interest": null,
"id": null
}],
"supporter": [{
"supported_organization": [{
"name": null,
"/common/topic/image": {
"id": null,
"limit": 1,
"optional": true
},
"/base/popstra/sww_base/heat": null,
"/base/popstra/sww_base/interest": null,
"id": null,
"optional": true,
"type": "/base/popstra/organization"
}],
"/base/popstra/sww_base/heat": null,
"/base/popstra/sww_base/interest": null,
"/base/popstra/sww_base/source": null,
"optional": true,
"id": null,
"type": "/base/popstra/support"
}],
"hangout": [{
"business_location": [{
"name": null,
"/common/topic/image": {
"id": null,
"limit": 1,
"optional": true
},
"/base/popstra/sww_base/heat": null,
"/base/popstra/sww_base/interest": null,
"id": null,
"optional": true,
"type": "/base/popstra/business_location"
}],
"/base/popstra/sww_base/heat": null,
"/base/popstra/sww_base/interest": null,
"/base/popstra/sww_base/source": null,
"optional": true,
"id": null,
"type": "/base/popstra/hangout"
}],
"/base/popstra/sww_base/heat": null,
"/base/popstra/sww_base/interest": null,
"id": "/en/nicole_kidman",
"name": null,
"type": "/base/popstra/celebrity"
}]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20090529/c49baca6/attachment.htm
More information about the Developers
mailing list