[Developers] invert and sort by mediated property values
Jack Alves
jack.alves at gmail.com
Sun May 31 01:38:11 UTC 2009
I just had the direction wrong. It makes much more sense when I use
any_reverse.
{
"master_property": {
"name": "Insult Victim",
"schema": null
},
"source": {
"id": "/en/paul_david_hewson"
},
"target": {
"/base/popstra/sww_base/interest": 75,
"/type/reflect/any_reverse": [
{
"id": "/en/paul_david_hewson",
"name": "Bono",
"type": [
{
"domain": "/base/popstra",
"id": "/base/popstra/celebrity"
},
{
"domain": "/base/popstra",
"id": "/base/popstra/topic"
},
{
"domain": "/base/popstra",
"id": "/base/popstra/sww_base"
}
]
},
{
"id": "/en/russell_crowe",
"name": "Russell Crowe",
"type": [
{
"domain": "/base/popstra",
"id": "/base/popstra/celebrity"
},
{
"domain": "/base/popstra",
"id": "/base/popstra/topic"
},
{
"domain": "/base/popstra",
"id": "/base/popstra/sww_base"
}
]
}
]
},
"type": "/type/link"
},
On Sat, May 30, 2009 at 6:28 PM, Jack Alves <jack.alves at gmail.com> wrote:
> This looks promising but I don't understand the result. I modified the
> query slightly to get the property type, and to constrain results to popstra
> types.
>
> [{
> "type": "/type/link",
> "source": {
> "id": null
> },
> "target": {
> "/base/popstra/sww_base/interest": null
>
> "/type/reflect/any_master": [{
> "type": [{
> "id":null,
> "domain":"/base/popstra"
> }],
> "name": null,
> "id": null
> }]
> },
> "master_property": {
> "name": null,
> "schema": {
> "limit": 0,
> "domain": "/base/popstra"
> }
> },
> "sort": "target./base/popstra/sww_base/interest"
> }]
>
> In the first result, the source guid refers to an infidelity mediator
> instance,
>
> http://www.freebase.com/view/guid/9202a8c04000641f800000000c2f4b87
>
> the target master refers to a public_insult mediator instance,
>
> http://www.freebase.com/view/guid/9202a8c04000641f800000000c2f58ec
>
> {
> "master_property": {
> "name": "Participant",
> "schema": null
> },
> "source": {
> "id": "/guid/9202a8c04000641f800000000c2f4b87"
> },
> "target": {
> "/base/popstra/sww_base/interest": 90,
> "/type/reflect/any_master": [{
> "id": "/guid/9202a8c04000641f800000000c2f58ec",
> "name": null,
> "type": [
> {
> "domain": "/base/popstra",
> "id": "/base/popstra/public_insult"
> },
> {
> "domain": "/base/popstra",
> "id": "/base/popstra/sww_base"
> },
> {
> "domain": "/base/popstra",
> "id": "/base/popstra/topic"
> }
> ]
> }]
> },
> "type": "/type/link"
>
> }
>
> On Fri, May 29, 2009 at 10:07 PM, John Giannandrea <jg at metaweb.com> wrote:
>
>>
>> Jack Alves wrote:
>> > 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.
>>
>> Assuming all your popstra mediators are connected one way, something
>> like this might be a good place to start...
>>
>> [{
>> "type": "/type/link",
>> "source": {
>> "id": "/en/nicole_kidman"
>> },
>> "target": {
>> "/base/popstra/sww_base/interest": null,
>> "/type/reflect/any_master": [{
>> "type": "/common/topic",
>> "name": null,
>> "id": null
>> }]
>> },
>> "master_property": {
>> "name": null,
>> "schema": {
>> "limit": 0,
>> "domain": "/base/popstra"
>> }
>> },
>> "sort": "target./base/popstra/sww_base/interest"
>> }]
>>
>> Remember also that to get images, the id of the topic is sufficient,
>> you can just link to a URL like:
>>
>> http://api.freebase.com/api/trans/image_thumb/en/nicole_kidman
>>
>> -jg
>>
>> _______________________________________________
>> 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/20090530/f075a407/attachment.htm
More information about the Developers
mailing list