[Developers] List Of Properties

Christian Hirsch hirsch.christian at gmail.com
Mon Jul 7 03:21:17 UTC 2008


This thread might be helpful:
http://markmail.org/message/uwfaeinosbmlorvw#query:+page:1+mid:lxet5u5eh64eljua+state:results
Warren suggested a query to retrieve all properties for a given topic...
Cheers,
Christian

On Mon, Jul 7, 2008 at 10:14 AM, Kendra Kuhl <kendra.kuhl at juggle.com> wrote:

>  I need some advice on the best way to do something. What I have isn't
> working for me anymore.
>
>
>
> A while ago I had asked for a way to get all the properties associated to a
> topic and Alexander was nice enough to give me this query:
>
>
>
> {
>
>   "query" : [
>
>     {
>
>       "master_property" : null,
>
>       "source" : {
>
>         "id" : "topicId"
>
>       },
>
>       "target" : {
>
>         "id" : null
>
>       },
>
>       "target_value" : null,
>
>       "type" : "/type/link"
>
>     }
>
>   ]
>
> }
>
>
>
> So, I modified it a bit to look like this:
>
>
>
> {
>
>   "query" : [
>
>     {
>
>       "master_property" : null,
>
>       "source" : {
>
>         "id" : null,
>
>         "guid" : null,
>
>         "name" : "Something"
>
>       },
>
>       "target_value" : null,
>
>       "type" : "/type/link"
>
>     }
>
>   ]
>
> }
>
>
>
> That worked out quite nicely until I started messing around with locations
> (and I'm sure locations aren't unique in this regard). But, if you send that
> query to freebase with Kansas as the name, you wind up getting back 2700
> properties. Most of them "/location/location/contains" but still, 2700. It
> takes forever if it doesn't time out on me.  (Even if I send in the exact
> guid, I still wind up with 2400 properties – 2300 of which are the
> /location/location/contains.).
>
>
>
> What I do with those properties is loop through them, filter out anything
> that starts with /guid, /type, /user as well as any duplicates and create
> another query to get the values for those properties.
>
>
>
> So, my question is this: given what I'm trying to accomplish, is there an
> easier way to go about it? Is there a way to get the properties for the
> topic, without duplicates, without /type, /guid, /user so I can then query
> to get the information I really want about the topic? I don't really want to
> hard code all the properties I want to go after for each and every type. I
> know I could use cursors to "page" through the data, but that would still
> take forever and I'm trying to make it as fast as possible.
>
>
>
> Thanks,
>
>
>
> Kendra
>
> _______________________________________________
> 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/20080707/637a2f4c/attachment-0001.htm 


More information about the Developers mailing list