From davidx at metaweb.com Fri Mar 2 01:16:22 2007 From: davidx at metaweb.com (David Andersen) Date: Thu, 01 Mar 2007 17:16:22 -0800 Subject: [Developers] test Message-ID: <45E77AE6.6000500@metaweb.com> test From tsturge at metaweb.com Fri Mar 2 01:35:23 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Thu, 01 Mar 2007 17:35:23 -0800 Subject: [Developers] Introducing myself Message-ID: <45E77F5B.6040106@metaweb.com> Hi freebase developers! A quick introduction: I straddle the middleware and infrastructure teams at Metaweb. Primarily I design and implement the MQL query language, although I have my fingers in a bunch of other areas from time to time. If you're new to freebase and MQL or would like to refresh your memory on the details you can find the MQL documentation at: http://www.freebase.com/metaweb/documentation/ If you have other questions about MQL or are interested in why it does (or does not) have a certain feature, send your comments to this mailing list. MQL is quite different from most existing query languages and I'm very interested in feedback about the design. I look forward to seeing your comments, Tim From fire at kidbombay.com Fri Mar 9 05:21:44 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Thu, 8 Mar 2007 21:21:44 -0800 Subject: [Developers] Movie Properties Message-ID: How do you get the blurb for a movie? { "query":[{ "name":"Titanic", "*":null, "type":"/film/film" }] } Doesn't return a property with that information. Ketan Anjaria fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070308/612989db/attachment.html From crism at metaweb.com Fri Mar 9 05:52:30 2007 From: crism at metaweb.com (Christopher R. Maden) Date: Thu, 08 Mar 2007 21:52:30 -0800 Subject: [Developers] Movie Properties In-Reply-To: References: Message-ID: <45F0F61E.1070507@metaweb.com> Ketan Anjaria wrote: > How do you get the blurb for a movie? > Doesn't return a property with that information. The blurb is a property of /common/topic; "*" only returns the properties of the specified type. Try either: { "query":[{ "name":"Titanic", "*":null, "type":"/common/topic" }] } or: { "query":[{ "name":"Titanic", "*":null, "type":"/film/film", "/common/topic/article":{ "id":null } }] } ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From fire at kidbombay.com Fri Mar 9 07:02:47 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Thu, 8 Mar 2007 23:02:47 -0800 Subject: [Developers] Movie Properties In-Reply-To: <45F0F61E.1070507@metaweb.com> References: <45F0F61E.1070507@metaweb.com> Message-ID: That just gives the link tho right? What about the article content? Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com On Mar 8, 2007, at 9:52 PM, Christopher R. Maden wrote: > Ketan Anjaria wrote: >> How do you get the blurb for a movie? >> Doesn't return a property with that information. > > The blurb is a property of /common/topic; "*" only returns the > properties of the specified type. > > Try either: > > { > "query":[{ > "name":"Titanic", > "*":null, > "type":"/common/topic" > }] > } > > or: > > { > "query":[{ > "name":"Titanic", > "*":null, > "type":"/film/film", > "/common/topic/article":{ > "id":null > } > }] > } > > ~Chris > -- > Christopher R. Maden > Data Architect > Metaweb Technologies, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070308/0e8e081c/attachment.htm From jg at metaweb.com Fri Mar 9 07:41:34 2007 From: jg at metaweb.com (John Giannandrea) Date: Thu, 8 Mar 2007 23:41:34 -0800 Subject: [Developers] Movie Properties In-Reply-To: References: <45F0F61E.1070507@metaweb.com> Message-ID: <20070309074134.GJ10673@metaweb.com> Ketan wrote: > That just gives the link tho right? > What about the article content? http://sandbox.freebase.com/api/trans/blurb/%239202a8c04000641f80000000002d22bb?maxlength=1000 see the documentation at: http://www.freebase.com/view/documentation/ch04.html#id2864571 -jg From crism at metaweb.com Fri Mar 9 11:56:01 2007 From: crism at metaweb.com (Christopher R. Maden) Date: Fri, 9 Mar 2007 03:56:01 -0800 (PST) Subject: [Developers] Movie Properties In-Reply-To: References: <45F0F61E.1070507@metaweb.com> Message-ID: <22129.66.245.27.98.1173441361.squirrel@66.245.27.98> Ketan Anjaria said: > That just gives the link tho right? > What about the article content? Once you have the GUID of the article in the graph, you pass that to the article service and it'll get you the content. ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From fire at kidbombay.com Fri Mar 9 18:37:57 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Fri, 9 Mar 2007 10:37:57 -0800 Subject: [Developers] Movie Properties In-Reply-To: <20070309074134.GJ10673@metaweb.com> References: <45F0F61E.1070507@metaweb.com> <20070309074134.GJ10673@metaweb.com> Message-ID: <1270D98A-B6BD-4FA1-AA5F-65C66846CD97@kidbombay.com> Is there a way to get that in the actual query tho? I am trying not to query the server again. That doc link just takes me to the top of that page. Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com On Mar 8, 2007, at 11:41 PM, John Giannandrea wrote: > > Ketan wrote: >> That just gives the link tho right? >> What about the article content? > > http://sandbox.freebase.com/api/trans/blurb/% > 239202a8c04000641f80000000002d22bb?maxlength=1000 > > see the documentation at: > http://www.freebase.com/view/documentation/ch04.html#id2864571 > > -jg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070309/a7d3a3b1/attachment.htm From tsturge at metaweb.com Fri Mar 9 18:49:50 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Fri, 09 Mar 2007 10:49:50 -0800 Subject: [Developers] Movie Properties In-Reply-To: <1270D98A-B6BD-4FA1-AA5F-65C66846CD97@kidbombay.com> References: <45F0F61E.1070507@metaweb.com> <20070309074134.GJ10673@metaweb.com> <1270D98A-B6BD-4FA1-AA5F-65C66846CD97@kidbombay.com> Message-ID: <45F1AC4E.6000208@metaweb.com> Unfortunately not. We currently view blobs (not just text, but also images) as data that needs to be separately requested via /api/trans/ (which also controls what format you get it in.) We have discussed adding the feature to allow you to get some text or a blurb back as a property of the content object directly. This isn't currently implemented. If you look at the way our search service behaves; it also independently fetches the blurb for each article (so it would be among the first candidates to move to a new API if we had one.) Thanks for asking the question; it's good to know what features would be useful externally as well as inside Metaweb. Tim Sturge Ketan Anjaria wrote: > Is there a way to get that in the actual query tho? > I am trying not to query the server again. > > That doc link just takes me to the top of that page. > > Ketan Anjaria > 415-260-8742 > fire at kidbombay.com > www.kidbombay.com > > > On Mar 8, 2007, at 11:41 PM, John Giannandrea wrote: > >> >> Ketan wrote: >>> That just gives the link tho right? >>> What about the article content? >> >> http://sandbox.freebase.com/api/trans/blurb/%239202a8c04000641f80000000002d22bb?maxlength=1000 >> >> see the documentation at: >> http://www.freebase.com/view/documentation/ch04.html#id2864571 >> >> -jg > > ------------------------------------------------------------------------ > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From fire at kidbombay.com Tue Mar 13 18:05:01 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Tue, 13 Mar 2007 11:05:01 -0700 Subject: [Developers] New SoundLine App needs queries Message-ID: <82D38EC8-601F-4F37-BF38-A04EABFAE145@kidbombay.com> I was hoping you could help me with this new SoundLine app. Here are the queries we will need. Earliest Time Query The Earliest date with any Musical artist All Genres Query All genres for any musical artists Artist Search Query An artist that matches an inputed name (not exact but close, like a google search) Properties Returned Artist Name Artist Guid Time and Genre Query All artists that were active in a given start time and end time, that also match any an optional given genres Artist Name Artist Guid Artist Start Date Artist End Date Artist Genres Artist Query Return the following properties for a musical given an artist guid Name guid start date end date country members name guid image albums name guid image release date tracks name track number I might need more for the artist later. This is what I have so far based on artist name not guid { "query":{ "active_end":null, "active_start":null, "album":[{ "/common/topic/image":[{ "guid":null, "limit":1, "optional":true }], "id":null, "name":null, "release_date":null }], "genre":[], "id":null, "member":[{}], "name":"The Police", "origin":null, "type":"/music/artist" } } Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070313/9d2b47e7/attachment.htm From fire at kidbombay.com Wed Mar 14 01:09:23 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Tue, 13 Mar 2007 18:09:23 -0700 Subject: [Developers] Searching for Non Null Values Message-ID: <1D228ADD-48A5-46D7-81D3-F7BFB485A0F7@kidbombay.com> I have the query { "query":[{ "active_end":null, "active_start":null, "guid":null, "name":null, "name~=":"Blue", "sort":"name", "type":"/music/artist" }] } I want to return all matches that are not null for active_end and active_start. Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070313/1d964902/attachment.htm From daepark at metaweb.com Wed Mar 14 01:11:05 2007 From: daepark at metaweb.com (Dae Park) Date: Tue, 13 Mar 2007 18:11:05 -0700 Subject: [Developers] Searching for Non Null Values In-Reply-To: <1D228ADD-48A5-46D7-81D3-F7BFB485A0F7@kidbombay.com> References: <1D228ADD-48A5-46D7-81D3-F7BFB485A0F7@kidbombay.com> Message-ID: try { "query":[{ "active_end":{ "value":null }, "active_start":{ "value":null }, "guid":null, "name":null, "name~=":"Blue", "sort":"name", "type":"/music/artist" }] } On Mar 13, 2007, at 6:09 PM, Ketan Anjaria wrote: > I have the query > { > "query":[{ > "active_end":null, > "active_start":null, > "guid":null, > "name":null, > "name~=":"Blue", > "sort":"name", > "type":"/music/artist" > }] > } > > I want to return all matches that are not null for active_end and > active_start. > > > Ketan Anjaria > 415-260-8742 > fire at kidbombay.com > www.kidbombay.com > > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From daepark at metaweb.com Wed Mar 14 01:17:46 2007 From: daepark at metaweb.com (Dae Park) Date: Tue, 13 Mar 2007 18:17:46 -0700 Subject: [Developers] Searching for Non Null Values In-Reply-To: References: <1D228ADD-48A5-46D7-81D3-F7BFB485A0F7@kidbombay.com> Message-ID: On Mar 13, 2007, at 6:11 PM, Dae Park wrote: > try > > { > "query":[{ > "active_end":{ > "value":null > }, > "active_start":{ > "value":null > }, > "guid":null, > "name":null, > "name~=":"Blue", > "sort":"name", > "type":"/music/artist" > }] > } I should explain why that works (correct me if I am wrong tsturge) but { "query":[{ "active_end":null, "active_start":null, "guid":null, "name":null, "name~=":"Blue", "sort":"name", "type":"/music/artist" }] } is essentially the same as: { "query":[{ "active_end": { "value": null, "optional": true }, "active_start":{ "value": null, "optional": true }, "guid":null, "name":null, "name~=":"Blue", "sort":"name", "type":"/music/artist" }] } so when you take out the optional for the value field, you're essentially asking for something that does not have a null value. -dae From fire at kidbombay.com Thu Mar 8 21:12:56 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Thu, 8 Mar 2007 13:12:56 -0800 Subject: [Developers] Query Multiple Types? Message-ID: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> I have the following query { "query":[{ "/common/topic/image":[{ "guid":null, "limit":1, "optional":true }], "guid":null, "limit":5, "name":null, "name~=":"Blue", "type":"/film/film" }] } I also want to run the same query but against different types in one read. Is it possible? Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070308/5b1be135/attachment.htm From nix at metaweb.com Wed Mar 14 01:39:55 2007 From: nix at metaweb.com (Nick Thompson) Date: Tue, 13 Mar 2007 18:39:55 -0700 Subject: [Developers] announcing mjt, and mjtemplate.org Message-ID: <45F7526B.4040407@metaweb.com> For the past few months i've been developing a Javascript HTML templating engine called "mjt" (usually pronounced "midget"). Mjt allows you to write HTML templates and fill them in with data from JSON web services, entirely in the browser. No server support is required - the app is delivered as static HTML and Javascript. It's easy to get started with, but also quite flexible. It's a novel approach to building AJAX-like apps. So far it's been a great way to build small Metaweb/Freebase applications and i think it will be useful with other services too. Mjt is open source. Please check it out and let me know what you think! http://mjtemplate.org/ nick From william at scissor.com Wed Mar 14 21:25:29 2007 From: william at scissor.com (William Pietri) Date: Wed, 14 Mar 2007 14:25:29 -0700 Subject: [Developers] Query Multiple Types? In-Reply-To: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> References: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> Message-ID: <45F86849.5020306@scissor.com> Ketan Anjaria wrote: > I have the following query [...] > I also want to run the same query but against different types in one read. Is it possible? Anybody have an answer for this one? I'm having a similar issue. I'd like to be able to look at all of the properties of an object without worrying about the type. The approaches I tried were ignoring the type: "query":[{ "*":null, "id":"#9202a8c04000641f80000000010c33ab" }] trying to say any types at all: "query":[{ "*":null, "id":"#9202a8c04000641f80000000010c33ab", "type":[] }] and specifying the types that the object has to get all the properties from both types: "query":[{ "*":null, "id":"#9202a8c04000641f80000000010c33ab", "type":["/common/topic","/freebase/software_ticket"] }] For various reasons none of these work. I understand why the second one fails; the magic meaning of the "type" field in the query field conflicts a little with the QBE style of MQL. At least at this stage of my understanding though, I'd expect the first and third to work. Thanks, William From jg at metaweb.com Wed Mar 14 21:25:43 2007 From: jg at metaweb.com (John Giannandrea) Date: Wed, 14 Mar 2007 14:25:43 -0700 Subject: [Developers] Query Multiple Types? In-Reply-To: <45F86849.5020306@scissor.com> References: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> <45F86849.5020306@scissor.com> Message-ID: <76B7C7E1-0B27-45F9-95DB-E165D5C4CE64@metaweb.com> William Pietri wrote: > Anybody have an answer for this one? I'm having a similar issue. I'd > like to be able to look at all of the properties of an object without > worrying about the type. The approaches I tried were ignoring the > type: if you dont care about the type (or more specifically the specific property): { "query":[{ "/type/reflect/any_master":[{}], "/type/reflect/any_reverse":[{}], "/type/reflect/any_value":[{}], "id":"#9202a8c04000641f80000000010c33ab" }] } -jg From jg at metaweb.com Wed Mar 14 21:29:24 2007 From: jg at metaweb.com (John Giannandrea) Date: Wed, 14 Mar 2007 14:29:24 -0700 Subject: [Developers] Query Multiple Types? In-Reply-To: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> References: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> Message-ID: <26EE161F-6A32-40AA-A3E7-E143A8667913@metaweb.com> Ketan Anjaria wrote: > I also want to run the same query but against different types in > one read. Is it possible? yes, you can do that like so: { "query":[{ "/common/topic/image":[{ "guid":null, "limit":1, "optional":true }], "guid":null, "limit":5, "name":null, "name~=":"Blue", "type":null, "type|=":["/film/film","/music/artist"] }] } From william at scissor.com Wed Mar 14 22:02:05 2007 From: william at scissor.com (William Pietri) Date: Wed, 14 Mar 2007 15:02:05 -0700 Subject: [Developers] "Must ask for a value when you use a comparison operator" Message-ID: <45F870DD.9020808@scissor.com> In working my way through the docs, I've been playing around with the comparison operators. I am occasionally getting the error "Must ask for a value when you use a comparison operator". Why must I? For the particular query I was doing, I didn't care what the value was. Or alternatively, if the value is either necessary or something that almost everybody wants, wouldn't it be better just to return the value without me explicitly asking for it? Thanks, William From tsturge at metaweb.com Wed Mar 14 22:44:13 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Wed, 14 Mar 2007 15:44:13 -0700 Subject: [Developers] "Must ask for a value when you use a comparison operator" In-Reply-To: <45F870DD.9020808@scissor.com> References: <45F870DD.9020808@scissor.com> Message-ID: <45F87ABD.9080106@metaweb.com> Hi William, This is a very good question. The restriction is indeed artificial and I agree it would be good to remove it. If you're not interested in the value, there's no reason for MQL to require you to ask about it. It would be more difficult to return the value automatically. Consider the Bradbury Building (a location in Blade Runner): { "id": "#9202a8c04000641f800000000047b022", "type": [], "/common/topic/alias": [], "name": null } { "alias" : [ "Bradbury Apartment Building", "Bradbury Apartments" ], "id" : "#9202a8c04000641f800000000047b022", "name" : "Bradbury Building", "type" : [ "\/common\/topic", "\/film\/film_location" ] } This topic has a name and two aliases that all match ~= "Bradbury". Asking for: [{ "name": null, "name~=": "Bradbury", "id": null, "type": "/film/film_location" } produces [ { "id" : "#9202a8c04000641f800000000047b022", "name" : "Bradbury Building", "type" : "\/film\/film_location" } ] but asking for: [{ "/common/topic/alias~=": "Bradbury", "id": null, "type": "/film/film_location", "/common/topic/alias": null }] results in: { "info" : { "count" : 2, "result" : [ "Bradbury Apartment Building", "Bradbury Apartments" ] }, "message" : "Unique query may have at most one result. Got 2", "path" : "\/common\/topic\/alias", "query" : [ { "\/common\/topic\/alias" : null, "\/common\/topic\/alias~=" : "Bradbury", "error_inside" : "\/common\/topic\/alias", "id" : null, "type" : "\/film\/film_location" } ], "status" : "\/mql\/status\/result_error", "type" : "\/mql\/error" } as there is more than one matching alias. This is a case where inferring "/common/topic/alias": null from "/common/topic/alias~=": "Bradbury" would break the query, whereas if MQL does not return the value there is no problem to solve. Thanks for asking, Tim William Pietri wrote: > In working my way through the docs, I've been playing around with the > comparison operators. I am occasionally getting the error "Must ask for > a value when you use a comparison operator". > > Why must I? For the particular query I was doing, I didn't care what the > value was. > > Or alternatively, if the value is either necessary or something that > almost everybody wants, wouldn't it be better just to return the value > without me explicitly asking for it? > > > Thanks, > > William > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From william at scissor.com Wed Mar 14 23:30:38 2007 From: william at scissor.com (William Pietri) Date: Wed, 14 Mar 2007 16:30:38 -0700 Subject: [Developers] "Must ask for a value when you use a comparison operator" In-Reply-To: <45F87ABD.9080106@metaweb.com> References: <45F870DD.9020808@scissor.com> <45F87ABD.9080106@metaweb.com> Message-ID: <45F8859E.3050707@scissor.com> Tim Sturge wrote: > Hi William, > > This is a very good question. The restriction is indeed artificial and > I agree it would be good to remove it. If you're not interested in the > value, there's no reason for MQL to require you to ask about it. > > It would be more difficult to return the value automatically. [...] > asking for: > > [{ "/common/topic/alias~=": "Bradbury", "id": null, "type": > "/film/film_location", "/common/topic/alias": null }] > > results in: [...] > > This is a case where inferring "/common/topic/alias": null from > "/common/topic/alias~=": "Bradbury" would break the query, whereas if > MQL does not return the value there is no problem to solve. Thanks, that's good to know. Personally I'd also prefer the leave-it-out approach, but if there are strong partisans for the must-return-something approach, then you could do something that parallels the behavior of "*":null where "null" really means "null" or "[]" depending on context. Particular solution aside, do you want people to put MQL language suggestions like this in with the tickets? http://www.freebase.com/view/filter?id=/freebase/software_ticket Or is mentioning things here sufficient? Thanks, William From tsturge at metaweb.com Wed Mar 14 23:50:58 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Wed, 14 Mar 2007 16:50:58 -0700 Subject: [Developers] "Must ask for a value when you use a comparison operator" In-Reply-To: <45F8859E.3050707@scissor.com> References: <45F870DD.9020808@scissor.com> <45F87ABD.9080106@metaweb.com> <45F8859E.3050707@scissor.com> Message-ID: <45F88A62.2060807@metaweb.com> I'm very happy with the mailing list right now. I'm already reading it, so there's one less thing for me to track if everything goes there. Tim William Pietri wrote: > Tim Sturge wrote: > >> Hi William, >> >> This is a very good question. The restriction is indeed artificial and >> I agree it would be good to remove it. If you're not interested in the >> value, there's no reason for MQL to require you to ask about it. >> >> It would be more difficult to return the value automatically. [...] >> asking for: >> >> [{ "/common/topic/alias~=": "Bradbury", "id": null, "type": >> "/film/film_location", "/common/topic/alias": null }] >> >> results in: [...] >> >> This is a case where inferring "/common/topic/alias": null from >> "/common/topic/alias~=": "Bradbury" would break the query, whereas if >> MQL does not return the value there is no problem to solve. >> > > Thanks, that's good to know. > > Personally I'd also prefer the leave-it-out approach, but if there are > strong partisans for the must-return-something approach, then you could > do something that parallels the behavior of > > "*":null > > where "null" really means "null" or "[]" depending on context. > > > Particular solution aside, do you want people to put MQL language > suggestions like this in with the tickets? > > http://www.freebase.com/view/filter?id=/freebase/software_ticket > > Or is mentioning things here sufficient? > > > > Thanks, > > William > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From jack at metaweb.com Fri Mar 16 05:43:50 2007 From: jack at metaweb.com (Jack Alves) Date: Thu, 15 Mar 2007 22:43:50 -0700 Subject: [Developers] Reverse sort with non-null values last or only non-null values Message-ID: I built a query to find all properties with expected_type=datetime. I want to reverse sort by the instance_count of the type that contains the property but I want null values to appear at the end of the results. Initially I tried the query below and discovered null values are returned first. { "query":[{ "properties":[{ "expected_type":"/type/datetime", "name":null, "schema":{ "/freebase/type_profile/instance_count":null, "name":null } }], "sort":"-properties.schema./freebase/type_profile/instance_count", "type":"/type/type" }] } Then I figured out how to reverse sort the non-null results (thanks to previous email thread Ketan/Dae). { "query":[{ "properties":[{ "expected_type":"/type/datetime", "name":null, "schema":{ "/freebase/type_profile/instance_count":{ "value":null }, "name":null } }], "sort":"-properties.schema./freebase/type_profile/instance_count.value", "type":"/type/type" }] } How do query for only null values? Is there a better way to do this? Do I need to parse the results in my script? From daepark at metaweb.com Fri Mar 16 19:08:47 2007 From: daepark at metaweb.com (Dae Park) Date: Fri, 16 Mar 2007 12:08:47 -0700 Subject: [Developers] mql status messages Message-ID: What are all the possible mql status messages in the response envelope for a 200 response? For example for timeouts you get a 200 with the status set to something like "/mql/status/timeout_error"? -dae From daepark at metaweb.com Fri Mar 16 19:09:57 2007 From: daepark at metaweb.com (Dae Park) Date: Fri, 16 Mar 2007 12:09:57 -0700 Subject: [Developers] mql status messages In-Reply-To: References: Message-ID: <4D5B583B-1BD2-4BEA-A691-E6A639754CC5@metaweb.com> From TimSturge: For the outer status currently you only get /mql/status/ok or /mql/status/error There is also a more specific status with each error message which is something like /mql/status/parse_error In place of "parse" you may see "result" "type" "timeout" "graph" "access" "internal" "internal_parse" "connection". Tim On Mar 16, 2007, at 12:08 PM, Dae Park wrote: > What are all the possible mql status messages in the response > envelope for a 200 response? > > For example for timeouts you get a 200 with the status set to > something like "/mql/status/timeout_error"? > > -dae > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From william at scissor.com Fri Mar 16 19:44:56 2007 From: william at scissor.com (William Pietri) Date: Fri, 16 Mar 2007 12:44:56 -0700 Subject: [Developers] mql status messages In-Reply-To: <4D5B583B-1BD2-4BEA-A691-E6A639754CC5@metaweb.com> References: <4D5B583B-1BD2-4BEA-A691-E6A639754CC5@metaweb.com> Message-ID: <45FAF3B8.4020408@scissor.com> Dae Park wrote: > [...] > > /mql/status/ok > /mql/status/error > /mql/status/parse_error > Those paths make me think those would be objects in Freebase, but I don't see them, at least not when searching by id. Is there some other place in Freebase I should be looking if I want to see the statuses and more information on them? Thanks, William From tim at metaweb.com Fri Mar 16 19:50:11 2007 From: tim at metaweb.com (Tim Kientzle) Date: Fri, 16 Mar 2007 12:50:11 -0700 Subject: [Developers] mql status messages In-Reply-To: <45FAF3B8.4020408@scissor.com> References: <4D5B583B-1BD2-4BEA-A691-E6A639754CC5@metaweb.com> <45FAF3B8.4020408@scissor.com> Message-ID: <9F057494-21C4-4D81-879E-08EF83DBFEFE@metaweb.com> I'd like to see us create an /api domain and put status messages for all of our services there, e.g., /api/mql/status/ok /api/account/login/failed etc. Tim Kientzle On Mar 16, 2007, at 12:44 PM, William Pietri wrote: > Dae Park wrote: >> [...] >> >> /mql/status/ok >> /mql/status/error >> /mql/status/parse_error >> > > Those paths make me think those would be objects in Freebase, but I > don't see them, at least not when searching by id. Is there some other > place in Freebase I should be looking if I want to see the statuses > and > more information on them? > > Thanks, > > William > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From jack at metaweb.com Sat Mar 17 01:31:13 2007 From: jack at metaweb.com (Jack Alves) Date: Fri, 16 Mar 2007 18:31:13 -0700 Subject: [Developers] Reverse sort with non-null values last or onlynon-null values In-Reply-To: Message-ID: I accomplished displaying non-null values at the end using a mjt script. I did the query for all results then repeated mjt.for loops with mjt.if statements, mjt.if="f.schema['/freebase/type_profile/instance_count'] != null"> mjt.if="f.schema['/freebase/type_profile/instance_count'] == null"> -----Original Message----- From: developers-bounces at freebase.com [mailto:developers-bounces at freebase.com] On Behalf Of Jack Alves Sent: Thursday, March 15, 2007 10:44 PM To: developers at freebase.com Subject: [Developers] Reverse sort with non-null values last or onlynon-null values I built a query to find all properties with expected_type=datetime. I want to reverse sort by the instance_count of the type that contains the property but I want null values to appear at the end of the results. Initially I tried the query below and discovered null values are returned first. { "query":[{ "properties":[{ "expected_type":"/type/datetime", "name":null, "schema":{ "/freebase/type_profile/instance_count":null, "name":null } }], "sort":"-properties.schema./freebase/type_profile/instance_count", "type":"/type/type" }] } Then I figured out how to reverse sort the non-null results (thanks to previous email thread Ketan/Dae). { "query":[{ "properties":[{ "expected_type":"/type/datetime", "name":null, "schema":{ "/freebase/type_profile/instance_count":{ "value":null }, "name":null } }], "sort":"-properties.schema./freebase/type_profile/instance_count.value", "type":"/type/type" }] } How do query for only null values? Is there a better way to do this? Do I need to parse the results in my script? _______________________________________________ Developers mailing list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/developers From william at scissor.com Tue Mar 20 22:15:37 2007 From: william at scissor.com (William Pietri) Date: Tue, 20 Mar 2007 15:15:37 -0700 Subject: [Developers] Calling Freebase from GWT? Message-ID: <46005D09.8030504@scissor.com> Has anybody managed to call the Freebase API from a GWT component? I'm a Javascript tyro, and I'm struggling to get it properly bound in with JSNI. My current hurdle, which I think I'll get past shortly, is getting the call to happen at all. But the one that scares me is getting callbacks to work properly on result arrival. Thanks, William From jack at metaweb.com Tue Mar 20 22:20:11 2007 From: jack at metaweb.com (Jack Alves) Date: Tue, 20 Mar 2007 15:20:11 -0700 Subject: [Developers] Same query doesn't return results anymore In-Reply-To: <35B28035-A64D-4C7F-9547-7BB9D944EC60@metaliq.com> Message-ID: Questions like this should be directed to developers at freebase.com. Are you sure it was the same query? The query does return results if you remove the genre property "genre":[{ "guid":null, "name":null }], or make it optional, "genre":[{ "guid":null, "name":null, "optional":true }], I suspect the original will work if the topic has a genre, http://www.freebase.com/api/metaweb/view?id=%239202a8c04000641f8000000000116 b90 -----Original Message----- From: Ketan Anjaria [mailto:ketan at metaliq.com] Sent: Tuesday, March 20, 2007 2:34 PM To: jack at metaweb.com Cc: 'Robert Cook'; data-team at metaweb.com; 'John Giannandrea' Subject: Re: SoundLine Issues It might just be my query { "query":{ "active_end":null, "active_start":null, "album":[{ "/common/topic/image":[{ "guid":null, "limit":1, "optional":true }], "id":null, "name":null, "release_date":{ "value":null } }], "genre":[{ "guid":null, "name":null }], "guid":"#9202a8c04000641f8000000000116b90", "member":[{ "member":{ "/common/topic/image":[{ "guid":null, "limit":1, "optional":true }], "guid":null, "name":null, "type":"/music/group_member" } }], "name":null, "origin":[{}], "type":"/music/artist" } } Used to work last week and now doesn't. Any ideas? From fire at kidbombay.com Wed Mar 21 21:53:29 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Wed, 21 Mar 2007 14:53:29 -0700 Subject: [Developers] Paging Results? Message-ID: <0D6E8CD9-7C66-4C5F-946D-E76C2C81927E@kidbombay.com> So I know the limit for queries is 100. Is there anyway to get more results than that? I want to return at least x amount more or be able to page through my results. Get page x of 1000 items with each page being 100 items. Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070321/d5904eb0/attachment.htm From jg at metaweb.com Wed Mar 21 21:53:54 2007 From: jg at metaweb.com (John Giannandrea) Date: Wed, 21 Mar 2007 14:53:54 -0700 Subject: [Developers] Paging Results? In-Reply-To: <0D6E8CD9-7C66-4C5F-946D-E76C2C81927E@kidbombay.com> References: <0D6E8CD9-7C66-4C5F-946D-E76C2C81927E@kidbombay.com> Message-ID: <515B229C-1470-4D74-8CDE-0FB1B0628503@metaweb.com> yes, MQL supports cursors. http://www.freebase.com/view/documentation/ch04.html#cursors -jg On Mar 21, 2007, at 2:53 PM, Ketan Anjaria wrote: > So I know the limit for queries is 100. Is there anyway to get more > results than that? > > I want to return at least x amount more or be able to page through > my results. Get page x of 1000 items with each page being 100 items. > > Ketan Anjaria > 415-260-8742 > fire at kidbombay.com > www.kidbombay.com > > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From william at scissor.com Wed Mar 21 22:08:06 2007 From: william at scissor.com (William Pietri) Date: Wed, 21 Mar 2007 15:08:06 -0700 Subject: [Developers] Paging Results? In-Reply-To: <515B229C-1470-4D74-8CDE-0FB1B0628503@metaweb.com> References: <0D6E8CD9-7C66-4C5F-946D-E76C2C81927E@kidbombay.com> <515B229C-1470-4D74-8CDE-0FB1B0628503@metaweb.com> Message-ID: <4601ACC6.9080108@scissor.com> John Giannandrea wrote: > yes, MQL supports cursors. > http://www.freebase.com/view/documentation/ch04.html#cursors > And in case it helps, this is a little different than a normal cursor, where you grab it and keep pulling results from it. When you get your first set of MQL results, you get a pointer to the next set. In that next set, you will get a pointer to the following set. In the following set, you get yet another pointer. Just keep getting the pointer out of the new set to get to the next set and you'll be fine. Oh, and also unlike a normal cursor, it doesn't appear that you have to close or free up the cursor when you're done. William From fire at kidbombay.com Wed Mar 21 22:13:04 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Wed, 21 Mar 2007 15:13:04 -0700 Subject: [Developers] Paging Results? In-Reply-To: <515B229C-1470-4D74-8CDE-0FB1B0628503@metaweb.com> References: <0D6E8CD9-7C66-4C5F-946D-E76C2C81927E@kidbombay.com> <515B229C-1470-4D74-8CDE-0FB1B0628503@metaweb.com> Message-ID: <62EADA3D-33C0-4207-A4E2-7708707A23CD@kidbombay.com> What about returning more than 100 results? Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com On Mar 21, 2007, at 2:53 PM, John Giannandrea wrote: > > > yes, MQL supports cursors. > http://www.freebase.com/view/documentation/ch04.html#cursors > > -jg > > > On Mar 21, 2007, at 2:53 PM, Ketan Anjaria wrote: > >> So I know the limit for queries is 100. Is there anyway to get >> more results than that? >> >> I want to return at least x amount more or be able to page through >> my results. Get page x of 1000 items with each page being 100 items. >> >> Ketan Anjaria >> 415-260-8742 >> fire at kidbombay.com >> www.kidbombay.com >> >> >> _______________________________________________ >> 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/20070321/7da16756/attachment.htm From jack at metaweb.com Wed Mar 21 22:18:35 2007 From: jack at metaweb.com (Jack Alves) Date: Wed, 21 Mar 2007 15:18:35 -0700 Subject: [Developers] Paging Results? In-Reply-To: <0D6E8CD9-7C66-4C5F-946D-E76C2C81927E@kidbombay.com> Message-ID: Limit is described in, http://www.freebase.com/view/documentation/ch03.html#id2615050 You can set limit to whatever you want it to be. For example, [{ "type":"/music/artist", "name":null, "limit":2000 }] "limit":0 (will return all results) _____ From: developers-bounces at freebase.com [mailto:developers-bounces at freebase.com] On Behalf Of Ketan Anjaria Sent: Wednesday, March 21, 2007 2:53 PM To: developers at freebase.com Subject: [Developers] Paging Results? So I know the limit for queries is 100. Is there anyway to get more results than that? I want to return at least x amount more or be able to page through my results. Get page x of 1000 items with each page being 100 items. Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070321/b208e3c3/attachment-0001.htm From jack at metaweb.com Wed Mar 21 23:55:12 2007 From: jack at metaweb.com (Jack Alves) Date: Wed, 21 Mar 2007 16:55:12 -0700 Subject: [Developers] SoundLine Updated In-Reply-To: <82604303-5B0C-4C26-9464-2CEBF1C706DA@kidbombay.com> Message-ID: I think the query is too restrictive for the data. We should decide what we want in the results. Not many artists have active_end dates. Here's the list of property values for some music related types, 271204 /music/album/artist 10975 /music/artist/active_start 2374 /music/artist/active_end 127 /music/artist/genre 161075 /music/album/release_date So removing the active_end requirement returns more data. { "query":[{ "active_end":null, "active_start":[{ "value":null, "value<=":"2007", "value>=":"1900" }], "guid":null, "name":null, "name~=":"*pink*", "sort":"name", "type":"/music/artist" }] } If you want to cover a large number of artists it is probably better to search based on the album release_date like, { "query":[{ "album":[{ "name":null, "release_date":[{ "value":null, "value<=":"1970", "value>=":"1960" }] }], "guid":null, "name":null, "name~=":"beatles", "sort":"name", "type":"/music/artist" }] } The query times out if you use wildcards in the name search. So just use the string entered by the user, and handle the timeout error in case someone includes wildcards. I'll report the timeout as a bug. _____ From: Ketan Anjaria [mailto:fire at kidbombay.com] Sent: Wednesday, March 21, 2007 4:09 PM Subject: Re: SoundLine Updated This is the search query { "query":[{ "active_end":[{ "value":null }], "active_start":[{ "value":null }], "guid":null, "name":null, "name~=":"*pink*", "sort":"name", "type":"/music/artist" }] } On the query editor I only return 2 results. Should I change my query? What's the client filter query look like? We have this same issue in the CineSpin On Mar 21, 2007, at 3:56 PM, Jack Alves wrote: Other issues noticed: - The Beatles don't show up in the list for the 1960's. - Search is not working properly. If I search for pink I only get two artists. On the freebase client if you filter on pink you get multiple pages of results. http://www.freebase.com/view/filter?id=/music/artist#ACJextraVpropertyJIJLty peLobjectLnameJHJpropertyYIdJIJLtypeLobjectLnameY9OJHJvalueJIJpinkJDB _____ From: Ketan Anjaria [mailto:fire at kidbombay.com] Sent: Wednesday, March 21, 2007 3:02 PM Subject: SoundLine Updated sound line has been updated I added the query for decades. Also the draw of the items is updated. Now events are stacked. Issues What to do when artist timeline is shorter than the width to display the name Non english characters and the apostrophe doesn't display. (The font I am using doesn't support it) What to show for albums when an artists releases multiple albums on the same day. (stagger?) You can drag the timeline vertically and horizontally now. Decade Query { "decade0":{ "query":[{ "active_end":[{ "value":null }], "active_start":[{ "value":null, "value<=":"1939", "value>=":"1930" }], "guid":null, "name":null, "sort":"name", "type":"/music/artist" }] }, "decade1":{ "query":[{ "active_end":[{ "value":null }], "active_start":[{ "value":null, "value<=":"1959", "value>=":"1950" }], "guid":null, "name":null, "sort":"name", "type":"/music/artist" }] } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070321/9a49bab0/attachment.htm From jdp at syntelos.com Thu Mar 22 14:50:36 2007 From: jdp at syntelos.com (John Pritchard) Date: Thu, 22 Mar 2007 10:50:36 -0400 Subject: [Developers] attributes of properties? Message-ID: Hi, Skipping a personal introduction, I'll jump right into some first thoughts on a look into MetaWeb. I like it, but.. MetaWeb appears (to me) to be in need of some "out of band" "attributes of properties". This is usually where "type" would live, but is best illustrated in the MetaWeb case by "key". It seems to me, in my humble opinion (ie, without much study), that the "key" thing is a bit messy. Comments? Cheers all, John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070322/44f0d5c2/attachment.htm From alecf at metaweb.com Thu Mar 22 15:54:40 2007 From: alecf at metaweb.com (Alec Flett) Date: Thu, 22 Mar 2007 08:54:40 -0700 Subject: [Developers] Paging Results? In-Reply-To: <4601ACC6.9080108@scissor.com> References: <0D6E8CD9-7C66-4C5F-946D-E76C2C81927E@kidbombay.com> <515B229C-1470-4D74-8CDE-0FB1B0628503@metaweb.com> <4601ACC6.9080108@scissor.com> Message-ID: <4602A6C0.4050407@metaweb.com> William Pietri wrote: > John Giannandrea wrote: > >> yes, MQL supports cursors. >> http://www.freebase.com/view/documentation/ch04.html#cursors >> >> > > And in case it helps, this is a little different than a normal cursor, > where you grab it and keep pulling results from it. > > The reason for this is that our "cursors" are stateless. The binary data you get in the cursor is actually an encoding of the "position" of the next item in the given query. Minus a few bugs here and there, this means you can re-run the same query with the same cursor over and over and keep getting the same results back - I believe this will work even if the results change, because the cursor should be recording the state of the graph when the query was run. Think of it as kind of a 'bookmark' into the query results. (At least for the next few months however, you shouldn't persist cursors for longer than a few minutes - we have at least one pending change to the cursor format that will render current cursors useless..) Alec > When you get your first set of MQL results, you get a pointer to the > next set. In that next set, you will get a pointer to the following set. > In the following set, you get yet another pointer. Just keep getting the > pointer out of the new set to get to the next set and you'll be fine. > > Oh, and also unlike a normal cursor, it doesn't appear that you have to > close or free up the cursor when you're done. > > William > > > _______________________________________________ > 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/20070322/e4e378be/attachment.htm From alecf at metaweb.com Thu Mar 22 16:07:15 2007 From: alecf at metaweb.com (Alec Flett) Date: Thu, 22 Mar 2007 09:07:15 -0700 Subject: [Developers] attributes of properties? In-Reply-To: References: Message-ID: <4602A9B3.4090909@metaweb.com> John Pritchard wrote: > > Hi, > > Skipping a personal introduction, I'll jump right into some first > thoughts on a look into MetaWeb. > > I like it, but.. MetaWeb appears (to me) to be in need of some "out of > band" "attributes of properties". This is usually where "type" would > live, but is best illustrated in the MetaWeb case by "key". It seems > to me, in my humble opinion (ie, without much study), that the "key" > thing is a bit messy. > Can you be more explicit about this? When you say "attributes of properties" what kind of attributes are you talking about? Properties themselves have a number of properties on them, including "expected_type" which is the type that the given value should have (i.e. so that /film/film/directed_by has an expected_type of /film/director) One thing that may be confusing here is that expected_type is not strongly enforced - it's really more of a hint to allow the query language to make assumptions about property values, which allows the syntax to be short when the expected_type of a property value does in fact match. I can explain this further if you want... the "key" thing may also be confusing because "key" is essentially a backpointer to the enclosing namespace. i.e. the "key" of /wikipedia/en/Anarchism is /wikipedia/en. Since a "namespace" is really just node that has a "keys" property, not all items in an id path are namespaces. For example, /wikipedia/en/Anarchism is not a namespace, but /wikipedia/en is. Alec From jdp at syntelos.com Thu Mar 22 17:06:37 2007 From: jdp at syntelos.com (John Pritchard) Date: Thu, 22 Mar 2007 13:06:37 -0400 Subject: [Developers] attributes of properties? In-Reply-To: <4602A9B3.4090909@metaweb.com> References: <4602A9B3.4090909@metaweb.com> Message-ID: Hi Alec, Yes, it's easier to deal with these issues in programming languages than databases (at least for me). The subject is about structural integrity. You're not concerned? I think I'm getting it, but it worries me like seeing "everything's a string" in a programming language. And then you're right that I'm not clear on keys. Learning, learning. Thanks for your reply. Regards, John On 3/22/07, Alec Flett wrote: > > John Pritchard wrote: > > > > Hi, > > > > Skipping a personal introduction, I'll jump right into some first > > thoughts on a look into MetaWeb. > > > > I like it, but.. MetaWeb appears (to me) to be in need of some "out of > > band" "attributes of properties". This is usually where "type" would > > live, but is best illustrated in the MetaWeb case by "key". It seems > > to me, in my humble opinion (ie, without much study), that the "key" > > thing is a bit messy. > > > Can you be more explicit about this? When you say "attributes of > properties" what kind of attributes are you talking about? Properties > themselves have a number of properties on them, including > "expected_type" which is the type that the given value should have (i.e. > so that /film/film/directed_by has an expected_type of /film/director) > > One thing that may be confusing here is that expected_type is not > strongly enforced - it's really more of a hint to allow the query > language to make assumptions about property values, which allows the > syntax to be short when the expected_type of a property value does in > fact match. I can explain this further if you want... > > the "key" thing may also be confusing because "key" is essentially a > backpointer to the enclosing namespace. i.e. the "key" of > /wikipedia/en/Anarchism is /wikipedia/en. Since a "namespace" is really > just node that has a "keys" property, not all items in an id path are > namespaces. For example, /wikipedia/en/Anarchism is not a namespace, but > /wikipedia/en is. > > Alec > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070322/4e4419fa/attachment-0001.htm From tsturge at metaweb.com Thu Mar 22 17:22:32 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Thu, 22 Mar 2007 10:22:32 -0700 Subject: [Developers] attributes of properties? In-Reply-To: References: Message-ID: <4602BB58.6040709@metaweb.com> Hi John, Welcome to Freebase! I agree that "key" and /type/key have special behaviour in MQL. They are important and common enough to be optimized internally. Hopefully the power they bring (the hierarchical path in an id like "/common/topic/article" or "/wikipedia/en/Anarchism") makes up for the slight inconsistencies in syntax. My belief is that most languages are stuck with inconsistencies in various places and the best you can do is try to minimize the impact on the language user. Some very popular languages (Perl and SQL are two good examples) have horribly inconsistent syntax, but are in common use and considered "easy to use" while others (Lisp is the classic case) have a very small and consistent syntax but aren't used that commonly and are considered "hard to learn". I'm also curious as to what you mean by "out of band attributes of properties". The closest thing I think MQL has to that is the "link" pseudo-property which enables you to examine the internal information of a particular property instance (such as who created it and when they did so.) This too is somewhat syntatically inconsistent (for example, "link" is not a property of any type.) Thanks for your comments, Tim John Pritchard wrote: > > Hi, > > Skipping a personal introduction, I'll jump right into some first > thoughts on a look into MetaWeb. > > I like it, but.. MetaWeb appears (to me) to be in need of some "out of > band" "attributes of properties". This is usually where "type" would > live, but is best illustrated in the MetaWeb case by "key". It seems > to me, in my humble opinion (ie, without much study), that the "key" > thing is a bit messy. > > Comments? > > > Cheers all, > > John > > > ------------------------------------------------------------------------ > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From jdp at syntelos.com Thu Mar 22 18:51:44 2007 From: jdp at syntelos.com (John Pritchard) Date: Thu, 22 Mar 2007 14:51:44 -0400 Subject: [Developers] attributes of properties? In-Reply-To: <4602BB58.6040709@metaweb.com> References: <4602BB58.6040709@metaweb.com> Message-ID: Hi Tim, many thanks for your warm welcome. I'm using "band" like we often use "space".. I got into "band" when focusing on web services design issues for tools (services), comparing the HTTP content-body (POST|PUT XML|JSON) with HTTP query-parameters (GET|POST url-encoded). As in "syntactic bands" where the HTTP query string has a very narrow band (little capacity for structure), and the content-body has a broad band capacity for structure. Makes for a quick analysis of tool (service) design issues. The debate here would be over a Property named "key", versus any Property having either Type Key or Attribute Key. So this is my getting to know Freebase, bringing along concepts from file formats and relational databases. For one, the Freebase key has a different conception from a relational database key. It's a unique Property value, but plays a different role in a graph than a key in a table. Cheers, John On 3/22/07, Tim Sturge wrote: > > Hi John, > > Welcome to Freebase! > > I agree that "key" and /type/key have special behaviour in MQL. They are > important and common enough to be optimized internally. Hopefully the > power they bring (the hierarchical path in an id like > "/common/topic/article" or "/wikipedia/en/Anarchism") makes up for the > slight inconsistencies in syntax. > > My belief is that most languages are stuck with inconsistencies in > various places and the best you can do is try to minimize the impact on > the language user. Some very popular languages (Perl and SQL are two > good examples) have horribly inconsistent syntax, but are in common use > and considered "easy to use" while others (Lisp is the classic case) > have a very small and consistent syntax but aren't used that commonly > and are considered "hard to learn". > > I'm also curious as to what you mean by "out of band attributes of > properties". The closest thing I think MQL has to that is the "link" > pseudo-property which enables you to examine the internal information of > a particular property instance (such as who created it and when they did > so.) This too is somewhat syntatically inconsistent (for example, "link" > is not a property of any type.) > > Thanks for your comments, > > Tim > > John Pritchard wrote: > > > > Hi, > > > > Skipping a personal introduction, I'll jump right into some first > > thoughts on a look into MetaWeb. > > > > I like it, but.. MetaWeb appears (to me) to be in need of some "out of > > band" "attributes of properties". This is usually where "type" would > > live, but is best illustrated in the MetaWeb case by "key". It seems > > to me, in my humble opinion (ie, without much study), that the "key" > > thing is a bit messy. > > > > Comments? > > > > > > Cheers all, > > > > John > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > 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/20070322/fb6d891a/attachment.htm From jack at metaweb.com Thu Mar 22 19:35:45 2007 From: jack at metaweb.com (Jack Alves) Date: Thu, 22 Mar 2007 12:35:45 -0700 Subject: [Developers] navigate from a freebase topic to an alternate visualization Message-ID: Dae asked me to send this note to the developers list. I think I need to do that before he will tell me the bookmarkable javascript I can use to navigate from freebase to cinespin. _____ From: Jack Alves Subject: RE: FilmSpin Updated I want CineSpin to accept id which could be a guid or a key so it can be invoked by a javascript bookmark. For instance today when I'm viewing "John Ford" the url looks like, http://www.freebase.com/view?id=/wikipedia/en_id/280738 In the future it might look like, http://www.freebase.com/api/metaweb/view?id=%239202a8c04000641f80000000001ad 475 So CineSpin should accept an valid id, /filmSpin/index.html#/id=9202a8c04000641f800000000015050b /filmSpin/index.html#/id=/wikipedia/en_id/280738 In either case you can do the following to get the guid and type if you need it for your existing queries, QUERY { "query":{ "guid":null, "id":"/wikipedia/en_id/280738", "name":null, "type":null, "type|=":["/film/film","/film/director","/film/actor"] } } OR QUERY { "query":{ "guid":null, "id":"#9202a8c04000641f80000000001ad475", "name":null, "type":null, "type|=":["/film/film","/film/director","/film/actor"] } } RESULT { "q1": { "status": "/mql/status/ok", "result": { "guid": "#9202a8c04000641f80000000001ad475", "type": "/film/director", "id": "/wikipedia/en_id/280738", "name": "John Ford" } }, "status": "200 OK" } The "|=" constriant is described in, http://www.freebase.com/view/documentation/ch03.html#id2616378 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070322/ca209b41/attachment.htm From daepark at metaweb.com Fri Mar 23 01:03:22 2007 From: daepark at metaweb.com (Dae Park) Date: Thu, 22 Mar 2007 18:03:22 -0700 Subject: [Developers] navigate from a freebase topic to an alternate visualization In-Reply-To: References: Message-ID: <30DF470E-DA72-4DEB-938D-5C1CB91541F8@metaweb.com> Try this: go From jack at metaweb.com Fri Mar 23 16:37:02 2007 From: jack at metaweb.com (Jack Alves) Date: Fri, 23 Mar 2007 09:37:02 -0700 Subject: [Developers] navigate from a freebase topic to an alternatevisualization In-Reply-To: <30DF470E-DA72-4DEB-938D-5C1CB91541F8@metaweb.com> Message-ID: Thanks. Email broke up the url. It was a little painful to reassemble but it works. I created a page with the link so it is easier to copy and paste as a bookmark, http://dev.mqlx.com/~jack/CineSpinnerLink.html It looks like it is generating a good url for filmSpin. >From John Ford with a key in the url, http://www.freebase.com/view?id=/wikipedia/en_id/280738 it generates http://kidbombay.com/clients/freebase/filmSpin/index.html#/id=/wikipedia/en_ id/280738 >From Clockwork Orange with a guid in the url http://www.freebase.com/view?id=%239202a8c04000641f8000000000593392 it generates, http://kidbombay.com/clients/freebase/filmSpin/index.html#/id=%239202a8c0400 0641f8000000000593392 Ketan when do you think you will have the id url feature done in CineSpin? This should be very cool. -----Original Message----- From: developers-bounces at freebase.com [mailto:developers-bounces at freebase.com] On Behalf Of Dae Park Sent: Thursday, March 22, 2007 6:03 PM To: jack at metaweb.com Cc: developers at freebase.com Subject: Re: [Developers] navigate from a freebase topic to an alternatevisualization Try this: go _______________________________________________ Developers mailing list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/developers From fire at kidbombay.com Fri Mar 23 17:14:48 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Fri, 23 Mar 2007 10:14:48 -0700 Subject: [Developers] navigate from a freebase topic to an alternatevisualization In-Reply-To: References: Message-ID: <9B1C0E13-3590-4575-8F8D-0AF858B3EFF9@kidbombay.com> This will be finished today. Incidentally I am in the office today for any last minute changes for CineSpin or SoundLine before the ETech demo. Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com On Mar 23, 2007, at 9:37 AM, Jack Alves wrote: > Thanks. Email broke up the url. It was a little painful to > reassemble but it > works. I created a page with the link so it is easier to copy and > paste as a > bookmark, > > http://dev.mqlx.com/~jack/CineSpinnerLink.html > > It looks like it is generating a good url for filmSpin. > >> From John Ford with a key in the url, > > http://www.freebase.com/view?id=/wikipedia/en_id/280738 > > it generates > > http://kidbombay.com/clients/freebase/filmSpin/index.html#/id=/ > wikipedia/en_ > id/280738 > > > > >> From Clockwork Orange with a guid in the url > > http://www.freebase.com/view?id=%239202a8c04000641f8000000000593392 > > it generates, > > http://kidbombay.com/clients/freebase/filmSpin/index.html#/id=% > 239202a8c0400 > 0641f8000000000593392 > > > Ketan when do you think you will have the id url feature done in > CineSpin? > This should be very cool. > > > -----Original Message----- > From: developers-bounces at freebase.com > [mailto:developers-bounces at freebase.com] On Behalf Of Dae Park > Sent: Thursday, March 22, 2007 6:03 PM > To: jack at metaweb.com > Cc: developers at freebase.com > Subject: Re: [Developers] navigate from a freebase topic to an > alternatevisualization > > Try this: > > go > > > > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > 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/20070323/8eaeb09f/attachment-0001.htm From fire at kidbombay.com Fri Mar 23 20:22:28 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Fri, 23 Mar 2007 13:22:28 -0700 Subject: [Developers] Query Timing Out Message-ID: <6B8439AE-7500-4524-BBB9-6D68FE2C87B3@kidbombay.com> I am trying run this query but it times out. Is there another way to structure this query so I can get the same data? { "query":[{ "album":[{ "/common/topic/image":[{ "guid":null, "limit":1, "optional":true }], "id":null, "name":null, "optional":true, "release_date":{ "value":null }, "release_type":{ "name":null, "optional":true }, "sort":"release_date.value" }], "guid":null, "name~=":"*beat*", "name":null, "sort":"name", "type":"/music/artist" }] } Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070323/df00dd8c/attachment.htm From jg at metaweb.com Fri Mar 23 20:34:49 2007 From: jg at metaweb.com (John Giannandrea) Date: Fri, 23 Mar 2007 13:34:49 -0700 Subject: [Developers] Query Timing Out In-Reply-To: <6B8439AE-7500-4524-BBB9-6D68FE2C87B3@kidbombay.com> References: <6B8439AE-7500-4524-BBB9-6D68FE2C87B3@kidbombay.com> Message-ID: <27A459D6-FDEC-4216-8FF2-99EB3921913D@metaweb.com> the wildcard is expensive because there are so many artists. just use "name~=":"beat" if that works for your app. -jg On Mar 23, 2007, at 1:22 PM, Ketan Anjaria wrote: > I am trying run this query but it times out. Is there another way > to structure this query so I can get the same data? > > { > "query":[{ > "album":[{ > "/common/topic/image":[{ > "guid":null, > "limit":1, > "optional":true > }], > "id":null, > "name":null, > "optional":true, > "release_date":{ > "value":null > }, > "release_type":{ > "name":null, > "optional":true > }, > "sort":"release_date.value" > }], > "guid":null, > "name~=":"*beat*", > "name":null, > "sort":"name", > "type":"/music/artist" > }] > } > > > Ketan Anjaria > 415-260-8742 > fire at kidbombay.com > www.kidbombay.com > > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From fire at kidbombay.com Fri Mar 23 21:18:07 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Fri, 23 Mar 2007 14:18:07 -0700 Subject: [Developers] Query Timing Out In-Reply-To: <27A459D6-FDEC-4216-8FF2-99EB3921913D@metaweb.com> References: <6B8439AE-7500-4524-BBB9-6D68FE2C87B3@kidbombay.com> <27A459D6-FDEC-4216-8FF2-99EB3921913D@metaweb.com> Message-ID: <4393FF51-E754-4F1B-ABEB-1E150EA15D5F@kidbombay.com> So you are saying there is no way around? Without wildcards doesn't help because if a user types in "beat" I want it to find beatles also. Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com On Mar 23, 2007, at 1:34 PM, John Giannandrea wrote: > > the wildcard is expensive because there are so many artists. > just use "name~=":"beat" if that works for your app. > > -jg > > On Mar 23, 2007, at 1:22 PM, Ketan Anjaria wrote: > >> I am trying run this query but it times out. Is there another way >> to structure this query so I can get the same data? >> >> { >> "query":[{ >> "album":[{ >> "/common/topic/image":[{ >> "guid":null, >> "limit":1, >> "optional":true >> }], >> "id":null, >> "name":null, >> "optional":true, >> "release_date":{ >> "value":null >> }, >> "release_type":{ >> "name":null, >> "optional":true >> }, >> "sort":"release_date.value" >> }], >> "guid":null, >> "name~=":"*beat*", >> "name":null, >> "sort":"name", >> "type":"/music/artist" >> }] >> } >> >> >> Ketan Anjaria >> 415-260-8742 >> fire at kidbombay.com >> www.kidbombay.com >> >> >> _______________________________________________ >> 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/20070323/099f8991/attachment.htm From tsturge at metaweb.com Fri Mar 23 21:27:22 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Fri, 23 Mar 2007 14:27:22 -0700 Subject: [Developers] Query Timing Out In-Reply-To: <4393FF51-E754-4F1B-ABEB-1E150EA15D5F@kidbombay.com> References: <6B8439AE-7500-4524-BBB9-6D68FE2C87B3@kidbombay.com> <27A459D6-FDEC-4216-8FF2-99EB3921913D@metaweb.com> <4393FF51-E754-4F1B-ABEB-1E150EA15D5F@kidbombay.com> Message-ID: <4604463A.1090906@metaweb.com> You might try just "beat*" which is a lot faster than "*beat*" and will find the beatles (but not "heartbeat") Tim Ketan Anjaria wrote: > So you are saying there is no way around? > Without wildcards doesn't help because if a user types in "beat" > I want it to find beatles also. > > Ketan Anjaria > 415-260-8742 > fire at kidbombay.com > www.kidbombay.com > > > On Mar 23, 2007, at 1:34 PM, John Giannandrea wrote: > >> >> the wildcard is expensive because there are so many artists. >> just use "name~=":"beat" if that works for your app. >> >> -jg >> >> On Mar 23, 2007, at 1:22 PM, Ketan Anjaria wrote: >> >>> I am trying run this query but it times out. Is there another way to >>> structure this query so I can get the same data? >>> >>> { >>> "query":[{ >>> "album":[{ >>> "/common/topic/image":[{ >>> "guid":null, >>> "limit":1, >>> "optional":true >>> }], >>> "id":null, >>> "name":null, >>> "optional":true, >>> "release_date":{ >>> "value":null >>> }, >>> "release_type":{ >>> "name":null, >>> "optional":true >>> }, >>> "sort":"release_date.value" >>> }], >>> "guid":null, >>> "name~=":"*beat*", >>> "name":null, >>> "sort":"name", >>> "type":"/music/artist" >>> }] >>> } >>> >>> >>> Ketan Anjaria >>> 415-260-8742 >>> fire at kidbombay.com >>> www.kidbombay.com >>> >>> >>> _______________________________________________ >>> Developers mailing list >>> Developers at freebase.com >>> http://lists.freebase.com/mailman/listinfo/developers >> > > ------------------------------------------------------------------------ > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From fire at kidbombay.com Fri Mar 23 21:29:22 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Fri, 23 Mar 2007 14:29:22 -0700 Subject: [Developers] Query Timing Out In-Reply-To: <4604463A.1090906@metaweb.com> References: <6B8439AE-7500-4524-BBB9-6D68FE2C87B3@kidbombay.com> <27A459D6-FDEC-4216-8FF2-99EB3921913D@metaweb.com> <4393FF51-E754-4F1B-ABEB-1E150EA15D5F@kidbombay.com> <4604463A.1090906@metaweb.com> Message-ID: <171AD6DC-9048-46D9-BF0E-14020A3A778B@kidbombay.com> Ok this query seems do what I need { "query":[{ "album":[{ "limit":1, "release_date":{ "value":null } }], "guid":null, "limit":1000, "name~=":"beat*", "name":null, "sort":"name", "type":"/music/artist" }] } Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com On Mar 23, 2007, at 2:27 PM, Tim Sturge wrote: > You might try just > > "beat*" > > which is a lot faster than "*beat*" and will find the beatles (but > not "heartbeat") > > Tim > > Ketan Anjaria wrote: >> So you are saying there is no way around? >> Without wildcards doesn't help because if a user types in "beat" >> I want it to find beatles also. >> >> Ketan Anjaria >> 415-260-8742 >> fire at kidbombay.com >> www.kidbombay.com >> >> >> On Mar 23, 2007, at 1:34 PM, John Giannandrea wrote: >> >>> >>> the wildcard is expensive because there are so many artists. >>> just use "name~=":"beat" if that works for your app. >>> >>> -jg >>> >>> On Mar 23, 2007, at 1:22 PM, Ketan Anjaria wrote: >>> >>>> I am trying run this query but it times out. Is there another >>>> way to structure this query so I can get the same data? >>>> >>>> { >>>> "query":[{ >>>> "album":[{ >>>> "/common/topic/image":[{ >>>> "guid":null, >>>> "limit":1, >>>> "optional":true >>>> }], >>>> "id":null, >>>> "name":null, >>>> "optional":true, >>>> "release_date":{ >>>> "value":null >>>> }, >>>> "release_type":{ >>>> "name":null, >>>> "optional":true >>>> }, >>>> "sort":"release_date.value" >>>> }], >>>> "guid":null, >>>> "name~=":"*beat*", >>>> "name":null, >>>> "sort":"name", >>>> "type":"/music/artist" >>>> }] >>>> } >>>> >>>> >>>> Ketan Anjaria >>>> 415-260-8742 >>>> fire at kidbombay.com >>>> www.kidbombay.com >>>> >>>> >>>> _______________________________________________ >>>> Developers mailing list >>>> Developers at freebase.com >>>> http://lists.freebase.com/mailman/listinfo/developers >>> >> >> --------------------------------------------------------------------- >> --- >> >> _______________________________________________ >> 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/20070323/5d174a6f/attachment-0001.htm From william at scissor.com Mon Mar 26 20:49:19 2007 From: william at scissor.com (William Pietri) Date: Mon, 26 Mar 2007 13:49:19 -0700 Subject: [Developers] magic null-or-empty-array? Message-ID: <460831CF.6080403@scissor.com> My understanding is that a query that contains "*" : null is magic in that null really means "please get me one value or many". Is there a way I can do that myself for a specific query? E.g., "varieties" : ??? where ??? is replaced with something that would return either "varieties":"Cirrus uncinus" or "varieties":["Cumulonimbus incus","Cumulonimbus calvus"] depending on which is appropriate? Thanks, William From crism at metaweb.com Mon Mar 26 21:09:37 2007 From: crism at metaweb.com (Christopher R. Maden) Date: Mon, 26 Mar 2007 13:09:37 -0800 (PST) Subject: [Developers] magic null-or-empty-array? In-Reply-To: <460831CF.6080403@scissor.com> References: <460831CF.6080403@scissor.com> Message-ID: <28885.66.245.154.27.1174943377.squirrel@66.245.154.27> William Pietri said: > Is there a way I can do that myself for a specific query? E.g., > "varieties" : ??? > where ??? is replaced with something that would return either > "varieties":"Cirrus uncinus" > or > "varieties":["Cumulonimbus incus","Cumulonimbus calvus"] > depending on which is appropriate? Is there a reason you need a non-list if there's only one value? In other words, would: "varieties":["Cirrus uncinus"] be acceptable? If so, then just specify: "varieties":[] in your query, and you'll get the above result. Otherwise, there isn't a way to specify a conditional return type depending on the number of results. Generally, unless you're sure there's only one value, using [] as the value placeholder is a better idea, since otherwise you'll get an error on multiple values. You can always ask for result["varieties"][0] if you only care about one result. Or specify "varieties":[{"name":null,"limit":1}] if you only want one result but there may be many in Freebase. HTH, Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From william at scissor.com Mon Mar 26 21:11:05 2007 From: william at scissor.com (William Pietri) Date: Mon, 26 Mar 2007 14:11:05 -0700 Subject: [Developers] Can I get a read-only account? Message-ID: <460836E9.3050609@scissor.com> As I mentioned before, I'm building a simple query builder, so that novices have a point-and-click way to get cozy with MQL. For technical reasons, all Freebase access goes through my server and my account. This tool has no need for write access. To isolate the tool from my regular use, I was going to create a second account. But I'd also like to make that account read-only, so that if my security isn't as solid as I'd expect, there'd still be no risk of harm. It's a pretty standard thing to do when building database-backed web apps. Is that possible for Freebase? Thanks, William From william at scissor.com Mon Mar 26 21:16:39 2007 From: william at scissor.com (William Pietri) Date: Mon, 26 Mar 2007 14:16:39 -0700 Subject: [Developers] magic null-or-empty-array? In-Reply-To: <28885.66.245.154.27.1174943377.squirrel@66.245.154.27> References: <460831CF.6080403@scissor.com> <28885.66.245.154.27.1174943377.squirrel@66.245.154.27> Message-ID: <46083837.4050502@scissor.com> Thanks for the speedy reply! Christopher R. Maden wrote: > William Pietri said: > >> Is there a way I can do that myself for a specific query? E.g., >> "varieties" : ??? >> where ??? is replaced with something that would return either >> "varieties":"Cirrus uncinus" >> or >> "varieties":["Cumulonimbus incus","Cumulonimbus calvus"] >> depending on which is appropriate? >> > > Is there a reason you need a non-list if there's only one value? > For pretty much the same reason it exists for the "*" case; it's prettier. It's not a big deal, but since the main point of the tool I'm building is to let people explore freebase data, I was trying to remove any unnecessary complexity. > Otherwise, there isn't a way to specify a conditional return type > depending on the number of results. Drat. Makes sense, though. Thanks! William From tim at metaweb.com Mon Mar 26 21:18:39 2007 From: tim at metaweb.com (Tim Kientzle) Date: Mon, 26 Mar 2007 14:18:39 -0700 Subject: [Developers] Can I get a read-only account? In-Reply-To: <460836E9.3050609@scissor.com> References: <460836E9.3050609@scissor.com> Message-ID: <583C0E1C-E9A2-44C3-A79D-75DEF192DCF5@metaweb.com> Support for this is in progress right now and should be available soon. Tim Kientzle On Mar 26, 2007, at 2:11 PM, William Pietri wrote: > > As I mentioned before, I'm building a simple query builder, so that > novices have a point-and-click way to get cozy with MQL. For technical > reasons, all Freebase access goes through my server and my account. > > This tool has no need for write access. To isolate the tool from my > regular use, I was going to create a second account. But I'd also like > to make that account read-only, so that if my security isn't as > solid as > I'd expect, there'd still be no risk of harm. It's a pretty standard > thing to do when building database-backed web apps. > > Is that possible for Freebase? > > Thanks, > > William > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From william at scissor.com Mon Mar 26 21:52:38 2007 From: william at scissor.com (William Pietri) Date: Mon, 26 Mar 2007 14:52:38 -0700 Subject: [Developers] Can I get a read-only account? In-Reply-To: <583C0E1C-E9A2-44C3-A79D-75DEF192DCF5@metaweb.com> References: <460836E9.3050609@scissor.com> <583C0E1C-E9A2-44C3-A79D-75DEF192DCF5@metaweb.com> Message-ID: <460840A6.4080109@scissor.com> Tim Kientzle wrote: > Support for this is in progress right now and should be available > soon. Great! In the meantime, should I just create a second account? Or would you like me to wait? Thanks, William From william at scissor.com Mon Mar 26 23:26:48 2007 From: william at scissor.com (William Pietri) Date: Mon, 26 Mar 2007 16:26:48 -0700 Subject: [Developers] Can I get a read-only account? In-Reply-To: <460840A6.4080109@scissor.com> References: <460836E9.3050609@scissor.com> <583C0E1C-E9A2-44C3-A79D-75DEF192DCF5@metaweb.com> <460840A6.4080109@scissor.com> Message-ID: <460856B8.9060104@scissor.com> William Pietri wrote: > In the meantime, should I just create a second account? Or would you > like me to wait? > Tim mentioned to me off-list that creating a second account was fine. Is there some special name I should use to make it clear that this isn't a normal user account? Wikipedia, for example, uses the suffix "-Bot" to make the distinction obvious. E.g., "AntiVandalBot". This won't quite be a bot, as it will be issuing a bunch of manual requests at the behest of users, so would something like "-App" be appropriate? E.g., "QueryBuilderApp"? Thanks, William From jg at metaweb.com Tue Mar 27 02:37:50 2007 From: jg at metaweb.com (John Giannandrea) Date: Mon, 26 Mar 2007 19:37:50 -0700 Subject: [Developers] Can I get a read-only account? In-Reply-To: <460856B8.9060104@scissor.com> References: <460836E9.3050609@scissor.com> <583C0E1C-E9A2-44C3-A79D-75DEF192DCF5@metaweb.com> <460840A6.4080109@scissor.com> <460856B8.9060104@scissor.com> Message-ID: <713AFBC5-3333-4E43-960D-AC218FA18B79@metaweb.com> _bot seems to be the emerging standard... { "query":[{ "id":"/user", "keys":{ "value":null, "value~=":"*bot*" }, "type":"/type/namespace" }] } -jg On Mar 26, 2007, at 4:26 PM, William Pietri wrote: > William Pietri wrote: >> In the meantime, should I just create a second account? Or would you >> like me to wait? >> > > > Tim mentioned to me off-list that creating a second account was fine. > > Is there some special name I should use to make it clear that this > isn't > a normal user account? Wikipedia, for example, uses the suffix "- > Bot" to > make the distinction obvious. E.g., "AntiVandalBot". This won't > quite be > a bot, as it will be issuing a bunch of manual requests at the > behest of > users, so would something like "-App" be appropriate? E.g., > "QueryBuilderApp"? > > Thanks, > > William > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From jack at metaweb.com Tue Mar 27 19:27:04 2007 From: jack at metaweb.com (Jack Alves) Date: Tue, 27 Mar 2007 12:27:04 -0700 Subject: [Developers] mjt script to display any topic with a specified date Message-ID: I want to get all properties that use a datetime then for each property get instances in a specified date range. What is the best way to accomplish what I want to do? I am writing a mjt script. I initially thought I would get the list of properties with datetime then iterate doing queries for each type that has a datetime property. I figured out how to get all properties that use datetime,
mjt.mqlread([{ "properties":[{ "expected_type":"/type/datetime", "name":null, "schema":{ "/freebase/type_profile/instance_count":null, "name":null } }], "sort":"-properties.schema./freebase/type_profile/instance_count", "limit": 75, "type":"/type/type" }])
and I know how to get instances with values in a specific date range,
mjt.mqlread([{ "date_of_birth":[{ "value":null, "value<":"1959-01-01", "value>":"1957-12-31" }], "name":null, "type":"/people/person" }])
I don't know how or if I can do the second query in a mjt.for loop. I noticed the mjt documentation says, "mjt.task= is very special and doesn't combine with any other attributes,". http://www.mjtemplate.org/tour/intro.html#combining-mjt-attributes. From nix at metaweb.com Tue Mar 27 21:59:16 2007 From: nix at metaweb.com (Nick Thompson) Date: Tue, 27 Mar 2007 14:59:16 -0700 Subject: [Developers] mjt script to display any topic with a specified date In-Reply-To: References: Message-ID: <460993B4.2020308@metaweb.com> you can do this by wrapping the mjt.task inside a mjt.def. when you invoke the function created by mjt.def, it will fire off the subquery. so you can't put the mjt.task inside a mjt.for loop, but if you put the task inside a mjt.def and call that function inside your for loop, it should do the right thing. i don't have good examples or documentation of this on mjtemplate.org yet, but i've used it quite a bit. nick Jack Alves wrote: > I want to get all properties that use a datetime then for each property get > instances in a specified date range. What is the best way to accomplish what > I want to do? I am writing a mjt script. I initially thought I would get the > list of properties with datetime then iterate doing queries for each type > that has a datetime property. > > I figured out how to get all properties that use datetime, > >
> mjt.mqlread([{ > "properties":[{ > "expected_type":"/type/datetime", > "name":null, > "schema":{ > "/freebase/type_profile/instance_count":null, > "name":null > } > }], > "sort":"-properties.schema./freebase/type_profile/instance_count", > "limit": 75, > "type":"/type/type" > }]) >
> > > and I know how to get instances with values in a specific date range, > >
> mjt.mqlread([{ > "date_of_birth":[{ > "value":null, > "value<":"1959-01-01", > "value>":"1957-12-31" > }], > "name":null, > "type":"/people/person" > }]) >
> > > I don't know how or if I can do the second query in a mjt.for loop. I > noticed the mjt documentation says, "mjt.task= is very special and doesn't > combine with any other attributes,". > http://www.mjtemplate.org/tour/intro.html#combining-mjt-attributes. > > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From jack at metaweb.com Wed Mar 28 00:13:07 2007 From: jack at metaweb.com (Jack Alves) Date: Tue, 27 Mar 2007 17:13:07 -0700 Subject: [Developers] date range Message-ID: So your decade query should use, "active_start":[{ "value":null, "value<":"1940", "value>=":"1930" }], I think you are currently using, "active_start":[{ "value":null, "value<=":"1939", "value>=":"1930" }], Year is the earliest time for the specific year. For example, "1939" is less than "Jan 1, 1939". From fire at kidbombay.com Wed Mar 28 01:16:50 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Tue, 27 Mar 2007 18:16:50 -0700 Subject: [Developers] Multiple Guid search? Message-ID: <27EF8275-A825-4058-B85A-FB5B7FC54C08@kidbombay.com> I have the following query { "decade0":{ "query":[{ "active_start":[{ "value<":"1980", "value>=":"1970", "value":null }], "album":[{ "limit":1, "release_date":{ "value<":"1980", "value>=":"1970", "value":null } }], "genre":[{ "guid":"#9202a8c04000641f80000000000e3f3b", "name":null, "type":"/music/genre" }], "guid":null, "limit":1000, "name":null, "sort":"name", "type":"/music/artist" }] } } How do I make it so I can specify to search for multiple matching guids for genre? I am trying to make a query that says get me artists from a certain decade that match any of the genres "genre" : { "guid" : "#9202a8c04000641f80000000000e3f3b", "type" : "/music/genre", "name" : "Hard rock", }, "genre" : { "guid" : "#9202a8c04000641f80000000001b7b21", "type" : "/music/genre", "name" : "Classic rock", }, Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070327/2b5f4fe1/attachment-0001.htm From tsturge at metaweb.com Wed Mar 28 02:15:33 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Tue, 27 Mar 2007 19:15:33 -0700 Subject: [Developers] Multiple Guid search? In-Reply-To: <27EF8275-A825-4058-B85A-FB5B7FC54C08@kidbombay.com> References: <27EF8275-A825-4058-B85A-FB5B7FC54C08@kidbombay.com> Message-ID: <4609CFC5.5000908@metaweb.com> You can use "guid|=" which allows you to specify a list of guids. So "genre": [ { "guid|=": [ "#9202a8c04000641f80000000000e3f3b", "#9202a8c04000641f80000000001b7b21" ] "guid": null ... } ] should do the trick. Tim Ketan Anjaria wrote: > I have the following query > { > "decade0":{ > "query":[{ > "active_start":[{ > "value<":"1980", > "value>=":"1970", > "value":null > }], > "album":[{ > "limit":1, > "release_date":{ > "value<":"1980", > "value>=":"1970", > "value":null > } > }], > "genre":[{ > "guid":"#9202a8c04000641f80000000000e3f3b", > "name":null, > "type":"/music/genre" > }], > "guid":null, > "limit":1000, > "name":null, > "sort":"name", > "type":"/music/artist" > }] > } > } > How do I make it so I can specify to search for multiple matching > guids for genre? > I am trying to make a query that says get me artists from a certain > decade that match any of the genres > > "genre" : { > "guid" : "#9202a8c04000641f80000000000e3f3b", > "type" : "/music/genre", > "name" : "Hard rock", > }, > "genre" : { > "guid" : "#9202a8c04000641f80000000001b7b21", > "type" : "/music/genre", > "name" : "Classic rock", > }, > > > > Ketan Anjaria > 415-260-8742 > fire at kidbombay.com > www.kidbombay.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From alee at metaweb.com Thu Mar 29 18:50:57 2007 From: alee at metaweb.com (Alison Lee) Date: Thu, 29 Mar 2007 11:50:57 -0700 Subject: [Developers] Calling Freebase from GWT? In-Reply-To: References: Message-ID: There are several issues to address in doing this. First, Google Web Toolkit (GWT) supports building AJAX application in Java. It provides a nice wrapper around XMLHttpRequest. However, cross-site issues prevent that approach to work for normal Freebase application where the GWT application host and the Freebase query server run at different sites. Section 4.5.2 of Developing Metaweb-Enabled Web Applications (http:// www.freebase.com/view/documentation/) describes several workarounds to the cross-site issues. GWT's developer site provides information and an example of how to dynamically fetch JSON feeds from other web domains (http://code.google.com/support/bin/answer.py? answer=55954&topic=10394). Note: the approach works but the some of the description and the code snippets are buggy. In summary, an approach is to: a) use a dynamically created script tag with a mqlread URL and a callback parameter in the GWT application, b) use the GWT approach to define a JSON callback into Java from external Javascript. Second, aside from the errors in the above-mentioned GWT example, there are issues to be aware of. For example, because a GWT is loaded in a zero-size IFrame inside the main document, this prevents "x instanceof Array" from working with the data returned by JSON. For details, see the discussion in GWT Google Groups (http:// groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/ b750195091da28cb/1ba006b4577365a8? lnk=gst&q=instanceof&rnum=10#1ba006b4577365a8). Therefore, processing the JavaScriptObject provided by the JSON callback requires writing some JSNI code and using a workaround to test for arrays. Without further ado, here's an application example that displays the MQL query result in a GWT tree widget. http://www.webcollab.com/freebase/gwtmqlread/ Alison P.S.: GWT is available from http://code.google.com/webtoolkit/ > -----Original Message----- > From: developers-bounces at freebase.com > [mailto:developers-bounces at freebase.com] On Behalf Of William Pietri > Sent: Tuesday, March 20, 2007 3:16 PM > To: developers at freebase.com > Subject: [Developers] Calling Freebase from GWT? > > Has anybody managed to call the Freebase API from a GWT component? > I'm a > Javascript tyro, and I'm struggling to get it properly bound in > with JSNI. > My current hurdle, which I think I'll get past shortly, is getting > the call > to happen at all. But the one that scares me is getting callbacks > to work > properly on result arrival. > > Thanks, > > William > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From jack at metaweb.com Thu Mar 29 19:56:44 2007 From: jack at metaweb.com (Jack Alves) Date: Thu, 29 Mar 2007 12:56:44 -0700 Subject: [Developers] mjt script to display any topic with a specified date In-Reply-To: <460993B4.2020308@metaweb.com> Message-ID: I have a script that displays types and properties from the first query (q1). Firebug reports "q1 has no properties" if I insert the div below in the body.
mjt.mqlread([{ "date_of_birth":[{ "value":null, "value<":"1959-01-01", "value>":"1957-12-31" }], "name":null, "type":"/people/person" }])
-----Original Message----- From: developers-bounces at freebase.com [mailto:developers-bounces at freebase.com] On Behalf Of Nick Thompson Sent: Tuesday, March 27, 2007 2:59 PM To: jack at metaweb.com Cc: developers at freebase.com Subject: Re: [Developers] mjt script to display any topic with a specified date you can do this by wrapping the mjt.task inside a mjt.def. when you invoke the function created by mjt.def, it will fire off the subquery. so you can't put the mjt.task inside a mjt.for loop, but if you put the task inside a mjt.def and call that function inside your for loop, it should do the right thing. i don't have good examples or documentation of this on mjtemplate.org yet, but i've used it quite a bit. nick Jack Alves wrote: > I want to get all properties that use a datetime then for each > property get instances in a specified date range. What is the best way > to accomplish what I want to do? I am writing a mjt script. I > initially thought I would get the list of properties with datetime > then iterate doing queries for each type that has a datetime property. > > I figured out how to get all properties that use datetime, > >
> mjt.mqlread([{ > "properties":[{ > "expected_type":"/type/datetime", > "name":null, > "schema":{ > "/freebase/type_profile/instance_count":null, > "name":null > } > }], > "sort":"-properties.schema./freebase/type_profile/instance_count", > "limit": 75, > "type":"/type/type" > }]) >
> > > and I know how to get instances with values in a specific date range, > >
> mjt.mqlread([{ > "date_of_birth":[{ > "value":null, > "value<":"1959-01-01", > "value>":"1957-12-31" > }], > "name":null, > "type":"/people/person" > }]) >
> > > I don't know how or if I can do the second query in a mjt.for loop. I > noticed the mjt documentation says, "mjt.task= is very special and > doesn't combine with any other attributes,". > http://www.mjtemplate.org/tour/intro.html#combining-mjt-attributes. > > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers _______________________________________________ Developers mailing list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/developers From nix at metaweb.com Thu Mar 29 20:11:39 2007 From: nix at metaweb.com (Nick Thompson) Date: Thu, 29 Mar 2007 13:11:39 -0700 Subject: [Developers] mjt script to display any topic with a specified date In-Reply-To: References: Message-ID: <460C1D7B.1070604@metaweb.com> hard to say what's going on - you must be using q1 somewhere else because it doesn't show up inside showTopic(). i think what you want is something like this. note that you need to do some mjt.script magic to set up the second query, because you need to ask for a property that was passed in as an argument: UNTESTED CODE!
                       /* need some js to build the query */
                       var taskq = {name: null, type: type};
                       taskq[property] = [{
                                           "value":null,
                                           "value<":"1959-01-01",
                                           "value>":"1957-12-31"
                                         }];
                    
mjt.mqlread([taskq])
... show q2.result ...
...
${showTopic(r.type, prop.id, startdate, enddate)}
let me know how that works... nick Jack Alves wrote: > I have a script that displays types and properties from the first query > (q1). Firebug reports "q1 has no properties" if I insert the div below in > the body. > > >
>
> mjt.mqlread([{ > "date_of_birth":[{ > "value":null, > "value<":"1959-01-01", > "value>":"1957-12-31" > }], > "name":null, > "type":"/people/person" > }]) >
> > > -----Original Message----- > From: developers-bounces at freebase.com > [mailto:developers-bounces at freebase.com] On Behalf Of Nick Thompson > Sent: Tuesday, March 27, 2007 2:59 PM > To: jack at metaweb.com > Cc: developers at freebase.com > Subject: Re: [Developers] mjt script to display any topic with a specified > date > > you can do this by wrapping the mjt.task inside a mjt.def. when you invoke > the function created by mjt.def, it will fire off the subquery. so you > can't put the mjt.task inside a mjt.for loop, but if you put the task inside > a mjt.def and call that function inside your for loop, it should do the > right thing. > > i don't have good examples or documentation of this on mjtemplate.org yet, > but i've used it quite a bit. > > nick > > Jack Alves wrote: >> I want to get all properties that use a datetime then for each >> property get instances in a specified date range. What is the best way >> to accomplish what I want to do? I am writing a mjt script. I >> initially thought I would get the list of properties with datetime >> then iterate doing queries for each type that has a datetime property. >> >> I figured out how to get all properties that use datetime, >> >>
>> mjt.mqlread([{ >> "properties":[{ >> "expected_type":"/type/datetime", >> "name":null, >> "schema":{ >> "/freebase/type_profile/instance_count":null, >> "name":null >> } >> }], >> "sort":"-properties.schema./freebase/type_profile/instance_count", >> "limit": 75, >> "type":"/type/type" >> }]) >>
>> >> >> and I know how to get instances with values in a specific date range, >> >>
>> mjt.mqlread([{ >> "date_of_birth":[{ >> "value":null, >> "value<":"1959-01-01", >> "value>":"1957-12-31" >> }], >> "name":null, >> "type":"/people/person" >> }]) >>
>> >> >> I don't know how or if I can do the second query in a mjt.for loop. I >> noticed the mjt documentation says, "mjt.task= is very special and >> doesn't combine with any other attributes,". >> http://www.mjtemplate.org/tour/intro.html#combining-mjt-attributes. >> >> >> _______________________________________________ >> Developers mailing list >> Developers at freebase.com >> http://lists.freebase.com/mailman/listinfo/developers > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From william at scissor.com Thu Mar 29 20:14:38 2007 From: william at scissor.com (William Pietri) Date: Thu, 29 Mar 2007 13:14:38 -0700 Subject: [Developers] Query Builder 0.4 Message-ID: <460C1E2E.5090502@scissor.com> At Jack's suggestion, I've been working on an app that allows point-and-click building of queries. You can see it here: http://dev.scissor.com/querybuilder/ Current features: * no freebase login required * browses domain/type tree * builds simple queries for single type * works against sandbox Right now, I think it works well enough to help newbies get going with MQL, so I'm releasing it to the public. In upcoming releases. There are a couple of known issues: * it's very ugly, at least until I get some CSS help * it doesn't allow filtering on all types * clicking on a property name in the property browser puts it at the bottom of the list Likely upcoming features include: * filtering support for o dates o booleans o numerics * executing queries * proper handling of mediator types (like roles in a film) * nested browsing of type properties * sorts * limits * optional constraints Please try it out and let me know what you think! Thanks, William From william at scissor.com Fri Mar 30 01:39:04 2007 From: william at scissor.com (William Pietri) Date: Thu, 29 Mar 2007 18:39:04 -0700 Subject: [Developers] Finding boolean non-unique properties Message-ID: <460C6A38.5030807@scissor.com> In testing out the query editor, I wanted to play around with boolean properties. They're easy enough to find with a simple query: [{ "expected_type":"/type/boolean", "id":null, "name":null, "type":"/type/property" }] Then in testing things out, I wanted to make sure to try ones that were unique, which I can find like this: [{ "expected_type":"/type/boolean", "id":null, "name":null, "type":"/type/property", "unique":true }] But what if I want to find the ones that aren't unique? Searching for this comes up with nothing: [{ "expected_type":"/type/boolean", "id":null, "name":null, "type":"/type/property", "unique":false }] But a null value for unique is treated as false, so I need to search for them, too. How do I do it? Thanks, William From jg at metaweb.com Fri Mar 30 02:28:56 2007 From: jg at metaweb.com (John Giannandrea) Date: Thu, 29 Mar 2007 19:28:56 -0700 Subject: [Developers] Finding boolean non-unique properties In-Reply-To: <460C6A38.5030807@scissor.com> References: <460C6A38.5030807@scissor.com> Message-ID: you cant do NOT queries in general. http://www.freebase.com/view/documentation/ch03.html#id2616622 -jg On Mar 29, 2007, at 6:39 PM, William Pietri wrote: > In testing out the query editor, I wanted to play around with boolean > properties. They're easy enough to find with a simple query: > > [{ > "expected_type":"/type/boolean", > "id":null, > "name":null, > "type":"/type/property" > }] > > Then in testing things out, I wanted to make sure to try ones that > were > unique, which I can find like this: > > [{ > "expected_type":"/type/boolean", > "id":null, > "name":null, > "type":"/type/property", > "unique":true > }] > > But what if I want to find the ones that aren't unique? Searching for > this comes up with nothing: > > > [{ > "expected_type":"/type/boolean", > "id":null, > "name":null, > "type":"/type/property", > "unique":false > }] > > > But a null value for unique is treated as false, so I need to > search for > them, too. How do I do it? > > Thanks, > > William > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From davidx at metaweb.com Fri Mar 2 01:16:22 2007 From: davidx at metaweb.com (David Andersen) Date: Thu, 01 Mar 2007 17:16:22 -0800 Subject: [Developers] test Message-ID: <45E77AE6.6000500@metaweb.com> test From tsturge at metaweb.com Fri Mar 2 01:35:23 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Thu, 01 Mar 2007 17:35:23 -0800 Subject: [Developers] Introducing myself Message-ID: <45E77F5B.6040106@metaweb.com> Hi freebase developers! A quick introduction: I straddle the middleware and infrastructure teams at Metaweb. Primarily I design and implement the MQL query language, although I have my fingers in a bunch of other areas from time to time. If you're new to freebase and MQL or would like to refresh your memory on the details you can find the MQL documentation at: http://www.freebase.com/metaweb/documentation/ If you have other questions about MQL or are interested in why it does (or does not) have a certain feature, send your comments to this mailing list. MQL is quite different from most existing query languages and I'm very interested in feedback about the design. I look forward to seeing your comments, Tim From fire at kidbombay.com Fri Mar 9 05:21:44 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Thu, 8 Mar 2007 21:21:44 -0800 Subject: [Developers] Movie Properties Message-ID: How do you get the blurb for a movie? { "query":[{ "name":"Titanic", "*":null, "type":"/film/film" }] } Doesn't return a property with that information. Ketan Anjaria fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070308/612989db/attachment-0001.html From crism at metaweb.com Fri Mar 9 05:52:30 2007 From: crism at metaweb.com (Christopher R. Maden) Date: Thu, 08 Mar 2007 21:52:30 -0800 Subject: [Developers] Movie Properties In-Reply-To: References: Message-ID: <45F0F61E.1070507@metaweb.com> Ketan Anjaria wrote: > How do you get the blurb for a movie? > Doesn't return a property with that information. The blurb is a property of /common/topic; "*" only returns the properties of the specified type. Try either: { "query":[{ "name":"Titanic", "*":null, "type":"/common/topic" }] } or: { "query":[{ "name":"Titanic", "*":null, "type":"/film/film", "/common/topic/article":{ "id":null } }] } ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From fire at kidbombay.com Fri Mar 9 07:02:47 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Thu, 8 Mar 2007 23:02:47 -0800 Subject: [Developers] Movie Properties In-Reply-To: <45F0F61E.1070507@metaweb.com> References: <45F0F61E.1070507@metaweb.com> Message-ID: That just gives the link tho right? What about the article content? Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com On Mar 8, 2007, at 9:52 PM, Christopher R. Maden wrote: > Ketan Anjaria wrote: >> How do you get the blurb for a movie? >> Doesn't return a property with that information. > > The blurb is a property of /common/topic; "*" only returns the > properties of the specified type. > > Try either: > > { > "query":[{ > "name":"Titanic", > "*":null, > "type":"/common/topic" > }] > } > > or: > > { > "query":[{ > "name":"Titanic", > "*":null, > "type":"/film/film", > "/common/topic/article":{ > "id":null > } > }] > } > > ~Chris > -- > Christopher R. Maden > Data Architect > Metaweb Technologies, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070308/0e8e081c/attachment-0002.htm From jg at metaweb.com Fri Mar 9 07:41:34 2007 From: jg at metaweb.com (John Giannandrea) Date: Thu, 8 Mar 2007 23:41:34 -0800 Subject: [Developers] Movie Properties In-Reply-To: References: <45F0F61E.1070507@metaweb.com> Message-ID: <20070309074134.GJ10673@metaweb.com> Ketan wrote: > That just gives the link tho right? > What about the article content? http://sandbox.freebase.com/api/trans/blurb/%239202a8c04000641f80000000002d22bb?maxlength=1000 see the documentation at: http://www.freebase.com/view/documentation/ch04.html#id2864571 -jg From crism at metaweb.com Fri Mar 9 11:56:01 2007 From: crism at metaweb.com (Christopher R. Maden) Date: Fri, 9 Mar 2007 03:56:01 -0800 (PST) Subject: [Developers] Movie Properties In-Reply-To: References: <45F0F61E.1070507@metaweb.com> Message-ID: <22129.66.245.27.98.1173441361.squirrel@66.245.27.98> Ketan Anjaria said: > That just gives the link tho right? > What about the article content? Once you have the GUID of the article in the graph, you pass that to the article service and it'll get you the content. ~Chris -- Christopher R. Maden Data Architect Metaweb Technologies, Inc. From fire at kidbombay.com Fri Mar 9 18:37:57 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Fri, 9 Mar 2007 10:37:57 -0800 Subject: [Developers] Movie Properties In-Reply-To: <20070309074134.GJ10673@metaweb.com> References: <45F0F61E.1070507@metaweb.com> <20070309074134.GJ10673@metaweb.com> Message-ID: <1270D98A-B6BD-4FA1-AA5F-65C66846CD97@kidbombay.com> Is there a way to get that in the actual query tho? I am trying not to query the server again. That doc link just takes me to the top of that page. Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com On Mar 8, 2007, at 11:41 PM, John Giannandrea wrote: > > Ketan wrote: >> That just gives the link tho right? >> What about the article content? > > http://sandbox.freebase.com/api/trans/blurb/% > 239202a8c04000641f80000000002d22bb?maxlength=1000 > > see the documentation at: > http://www.freebase.com/view/documentation/ch04.html#id2864571 > > -jg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070309/a7d3a3b1/attachment-0002.htm From tsturge at metaweb.com Fri Mar 9 18:49:50 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Fri, 09 Mar 2007 10:49:50 -0800 Subject: [Developers] Movie Properties In-Reply-To: <1270D98A-B6BD-4FA1-AA5F-65C66846CD97@kidbombay.com> References: <45F0F61E.1070507@metaweb.com> <20070309074134.GJ10673@metaweb.com> <1270D98A-B6BD-4FA1-AA5F-65C66846CD97@kidbombay.com> Message-ID: <45F1AC4E.6000208@metaweb.com> Unfortunately not. We currently view blobs (not just text, but also images) as data that needs to be separately requested via /api/trans/ (which also controls what format you get it in.) We have discussed adding the feature to allow you to get some text or a blurb back as a property of the content object directly. This isn't currently implemented. If you look at the way our search service behaves; it also independently fetches the blurb for each article (so it would be among the first candidates to move to a new API if we had one.) Thanks for asking the question; it's good to know what features would be useful externally as well as inside Metaweb. Tim Sturge Ketan Anjaria wrote: > Is there a way to get that in the actual query tho? > I am trying not to query the server again. > > That doc link just takes me to the top of that page. > > Ketan Anjaria > 415-260-8742 > fire at kidbombay.com > www.kidbombay.com > > > On Mar 8, 2007, at 11:41 PM, John Giannandrea wrote: > >> >> Ketan wrote: >>> That just gives the link tho right? >>> What about the article content? >> >> http://sandbox.freebase.com/api/trans/blurb/%239202a8c04000641f80000000002d22bb?maxlength=1000 >> >> see the documentation at: >> http://www.freebase.com/view/documentation/ch04.html#id2864571 >> >> -jg > > ------------------------------------------------------------------------ > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers > From fire at kidbombay.com Tue Mar 13 18:05:01 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Tue, 13 Mar 2007 11:05:01 -0700 Subject: [Developers] New SoundLine App needs queries Message-ID: <82D38EC8-601F-4F37-BF38-A04EABFAE145@kidbombay.com> I was hoping you could help me with this new SoundLine app. Here are the queries we will need. Earliest Time Query The Earliest date with any Musical artist All Genres Query All genres for any musical artists Artist Search Query An artist that matches an inputed name (not exact but close, like a google search) Properties Returned Artist Name Artist Guid Time and Genre Query All artists that were active in a given start time and end time, that also match any an optional given genres Artist Name Artist Guid Artist Start Date Artist End Date Artist Genres Artist Query Return the following properties for a musical given an artist guid Name guid start date end date country members name guid image albums name guid image release date tracks name track number I might need more for the artist later. This is what I have so far based on artist name not guid { "query":{ "active_end":null, "active_start":null, "album":[{ "/common/topic/image":[{ "guid":null, "limit":1, "optional":true }], "id":null, "name":null, "release_date":null }], "genre":[], "id":null, "member":[{}], "name":"The Police", "origin":null, "type":"/music/artist" } } Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070313/9d2b47e7/attachment-0002.htm From fire at kidbombay.com Wed Mar 14 01:09:23 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Tue, 13 Mar 2007 18:09:23 -0700 Subject: [Developers] Searching for Non Null Values Message-ID: <1D228ADD-48A5-46D7-81D3-F7BFB485A0F7@kidbombay.com> I have the query { "query":[{ "active_end":null, "active_start":null, "guid":null, "name":null, "name~=":"Blue", "sort":"name", "type":"/music/artist" }] } I want to return all matches that are not null for active_end and active_start. Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070313/1d964902/attachment-0002.htm From daepark at metaweb.com Wed Mar 14 01:11:05 2007 From: daepark at metaweb.com (Dae Park) Date: Tue, 13 Mar 2007 18:11:05 -0700 Subject: [Developers] Searching for Non Null Values In-Reply-To: <1D228ADD-48A5-46D7-81D3-F7BFB485A0F7@kidbombay.com> References: <1D228ADD-48A5-46D7-81D3-F7BFB485A0F7@kidbombay.com> Message-ID: try { "query":[{ "active_end":{ "value":null }, "active_start":{ "value":null }, "guid":null, "name":null, "name~=":"Blue", "sort":"name", "type":"/music/artist" }] } On Mar 13, 2007, at 6:09 PM, Ketan Anjaria wrote: > I have the query > { > "query":[{ > "active_end":null, > "active_start":null, > "guid":null, > "name":null, > "name~=":"Blue", > "sort":"name", > "type":"/music/artist" > }] > } > > I want to return all matches that are not null for active_end and > active_start. > > > Ketan Anjaria > 415-260-8742 > fire at kidbombay.com > www.kidbombay.com > > > _______________________________________________ > Developers mailing list > Developers at freebase.com > http://lists.freebase.com/mailman/listinfo/developers From daepark at metaweb.com Wed Mar 14 01:17:46 2007 From: daepark at metaweb.com (Dae Park) Date: Tue, 13 Mar 2007 18:17:46 -0700 Subject: [Developers] Searching for Non Null Values In-Reply-To: References: <1D228ADD-48A5-46D7-81D3-F7BFB485A0F7@kidbombay.com> Message-ID: On Mar 13, 2007, at 6:11 PM, Dae Park wrote: > try > > { > "query":[{ > "active_end":{ > "value":null > }, > "active_start":{ > "value":null > }, > "guid":null, > "name":null, > "name~=":"Blue", > "sort":"name", > "type":"/music/artist" > }] > } I should explain why that works (correct me if I am wrong tsturge) but { "query":[{ "active_end":null, "active_start":null, "guid":null, "name":null, "name~=":"Blue", "sort":"name", "type":"/music/artist" }] } is essentially the same as: { "query":[{ "active_end": { "value": null, "optional": true }, "active_start":{ "value": null, "optional": true }, "guid":null, "name":null, "name~=":"Blue", "sort":"name", "type":"/music/artist" }] } so when you take out the optional for the value field, you're essentially asking for something that does not have a null value. -dae From fire at kidbombay.com Thu Mar 8 21:12:56 2007 From: fire at kidbombay.com (Ketan Anjaria) Date: Thu, 8 Mar 2007 13:12:56 -0800 Subject: [Developers] Query Multiple Types? Message-ID: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> I have the following query { "query":[{ "/common/topic/image":[{ "guid":null, "limit":1, "optional":true }], "guid":null, "limit":5, "name":null, "name~=":"Blue", "type":"/film/film" }] } I also want to run the same query but against different types in one read. Is it possible? Ketan Anjaria 415-260-8742 fire at kidbombay.com www.kidbombay.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freebase.com/pipermail/developers/attachments/20070308/5b1be135/attachment-0002.htm From nix at metaweb.com Wed Mar 14 01:39:55 2007 From: nix at metaweb.com (Nick Thompson) Date: Tue, 13 Mar 2007 18:39:55 -0700 Subject: [Developers] announcing mjt, and mjtemplate.org Message-ID: <45F7526B.4040407@metaweb.com> For the past few months i've been developing a Javascript HTML templating engine called "mjt" (usually pronounced "midget"). Mjt allows you to write HTML templates and fill them in with data from JSON web services, entirely in the browser. No server support is required - the app is delivered as static HTML and Javascript. It's easy to get started with, but also quite flexible. It's a novel approach to building AJAX-like apps. So far it's been a great way to build small Metaweb/Freebase applications and i think it will be useful with other services too. Mjt is open source. Please check it out and let me know what you think! http://mjtemplate.org/ nick From william at scissor.com Wed Mar 14 21:25:29 2007 From: william at scissor.com (William Pietri) Date: Wed, 14 Mar 2007 14:25:29 -0700 Subject: [Developers] Query Multiple Types? In-Reply-To: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> References: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> Message-ID: <45F86849.5020306@scissor.com> Ketan Anjaria wrote: > I have the following query [...] > I also want to run the same query but against different types in one read. Is it possible? Anybody have an answer for this one? I'm having a similar issue. I'd like to be able to look at all of the properties of an object without worrying about the type. The approaches I tried were ignoring the type: "query":[{ "*":null, "id":"#9202a8c04000641f80000000010c33ab" }] trying to say any types at all: "query":[{ "*":null, "id":"#9202a8c04000641f80000000010c33ab", "type":[] }] and specifying the types that the object has to get all the properties from both types: "query":[{ "*":null, "id":"#9202a8c04000641f80000000010c33ab", "type":["/common/topic","/freebase/software_ticket"] }] For various reasons none of these work. I understand why the second one fails; the magic meaning of the "type" field in the query field conflicts a little with the QBE style of MQL. At least at this stage of my understanding though, I'd expect the first and third to work. Thanks, William From jg at metaweb.com Wed Mar 14 21:25:43 2007 From: jg at metaweb.com (John Giannandrea) Date: Wed, 14 Mar 2007 14:25:43 -0700 Subject: [Developers] Query Multiple Types? In-Reply-To: <45F86849.5020306@scissor.com> References: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> <45F86849.5020306@scissor.com> Message-ID: <76B7C7E1-0B27-45F9-95DB-E165D5C4CE64@metaweb.com> William Pietri wrote: > Anybody have an answer for this one? I'm having a similar issue. I'd > like to be able to look at all of the properties of an object without > worrying about the type. The approaches I tried were ignoring the > type: if you dont care about the type (or more specifically the specific property): { "query":[{ "/type/reflect/any_master":[{}], "/type/reflect/any_reverse":[{}], "/type/reflect/any_value":[{}], "id":"#9202a8c04000641f80000000010c33ab" }] } -jg From jg at metaweb.com Wed Mar 14 21:29:24 2007 From: jg at metaweb.com (John Giannandrea) Date: Wed, 14 Mar 2007 14:29:24 -0700 Subject: [Developers] Query Multiple Types? In-Reply-To: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> References: <45F69A53-1EF3-47D8-BF58-C95AE0B0C200@kidbombay.com> Message-ID: <26EE161F-6A32-40AA-A3E7-E143A8667913@metaweb.com> Ketan Anjaria wrote: > I also want to run the same query but against different types in > one read. Is it possible? yes, you can do that like so: { "query":[{ "/common/topic/image":[{ "guid":null, "limit":1, "optional":true }], "guid":null, "limit":5, "name":null, "name~=":"Blue", "type":null, "type|=":["/film/film","/music/artist"] }] } From william at scissor.com Wed Mar 14 22:02:05 2007 From: william at scissor.com (William Pietri) Date: Wed, 14 Mar 2007 15:02:05 -0700 Subject: [Developers] "Must ask for a value when you use a comparison operator" Message-ID: <45F870DD.9020808@scissor.com> In working my way through the docs, I've been playing around with the comparison operators. I am occasionally getting the error "Must ask for a value when you use a comparison operator". Why must I? For the particular query I was doing, I didn't care what the value was. Or alternatively, if the value is either necessary or something that almost everybody wants, wouldn't it be better just to return the value without me explicitly asking for it? Thanks, William From tsturge at metaweb.com Wed Mar 14 22:44:13 2007 From: tsturge at metaweb.com (Tim Sturge) Date: Wed, 14 Mar 2007 15:44:13 -0700 Subject: [Developers] "Must ask for a value when you use a comparison operator" In-Reply-To: <45F870DD.9020808@scissor.com> References: <45F870DD.9020808@scissor.com> Message-ID: <45F87ABD.9080106@metaweb.com> Hi William, This is a very good question. The restriction is indeed artificial and I agree it would be good to remove it. If you're not interested in the value, there's no reason for MQL to require you to ask about it. It would be more difficult to return the value automatically. Consider the Bradbury Building (a location in Blade Runner): { "id": "#9202a8c04000641f800000000047b022", "type": [], "/common/topic/alias": [], "name": null } { "alias" : [ "Bradbury Apartment Building", "Bradbury Apartments" ], "id" : "#9202a8c04000641f800000000047b022", "name" : "Bradbury Building", "type" : [ "\/common\/topic", "\/film\/film_location" ] } This topic has a name and two aliases that all match ~= "Bradbury". Asking for: [{ "name": null, "name~=": "Bradbury", "id": null, "type": "/film/film_location" } produces [ { "id" : "#9202a8c04000641f800000000047b022", "name" : "Bradbury Building", "type" : "\/film\/film_location" } ] but asking for: [{ "/common/topic/alias~=": "Bradbury", "id": null, "type": "/film/film_location", "/common/topic/alias": null }] results in: { "info" : { "count" : 2, "result" : [ "Bradbury Apartment Building", "Bradbury Apartments" ] }, "message" : "Unique query may have at most one result. Got 2", "path" : "\/common\/topic\/alias", "query" : [ { "\/common\/topic\/alias" : null, "\/common\/topic\/alias~=" : "Bradbury", "error_inside" : "\/common\/topic\/alias", "id" : null, "type" : "\/film\/film_location" } ], "status" : "\/mql\/status\/result_error", "type" : "\/mql\/error" } as there is more than one matching alias. This is a case where inferring "/common/topic/alias": null from "/common/topic/alias~=": "Bradbury" would break the query, whereas if MQL does not return the value there is no problem to solve. Thanks for asking, Tim William Pietri wrote: > In working my way through the docs, I've been playing around with the > comparison