[Developers] invert and sort by mediated property values

Jack Alves jack.alves at gmail.com
Sun May 31 01:28:14 UTC 2009


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/cb92fde7/attachment-0001.htm 


More information about the Developers mailing list