11 messages in com.freebase.developers[Developers] OR operator in query
FromSent OnAttachments
Christian HirschJun 19, 2008 8:03 pm 
Arthur van HoffJun 19, 2008 8:19 pm 
David FlanaganJun 20, 2008 1:25 pm 
Christian HirschJun 22, 2008 9:34 pm 
John GiannandreaJun 22, 2008 9:49 pm 
Christian HirschJun 22, 2008 10:29 pm 
Christian HirschJun 22, 2008 10:36 pm 
Christopher R. MadenJun 23, 2008 12:04 am 
Dae ParkJun 23, 2008 12:44 pm 
Warren HarrisJun 23, 2008 2:56 pm 
Christian HirschJun 24, 2008 3:11 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[Developers] OR operator in queryActions
From:Christian Hirsch (hirs@gmail.com)
Date:Jun 19, 2008 8:03:25 pm
List:com.freebase.developers

Hi,

I'm starting with a topic id (e.g. /en/the_departed) and like to query all of its properties (e.g. all actors starring in the movie, awards won, etc.).

At the moment I'm using separate queries for each type which is associated with the topic to get all these information, e.g.:

{ "*" : [], "id" : "/en/the_departed", "type" : "/film/film" }

------------

{ "*" : [], "id" : "/en/the_departed", "type" : "/award/award_winning_work" }

------------

etc.

This works well but is not very efficient. First of all a query is needed to get the types of the topic: { "id" : "/en/the_departed", "type" : [] }

...and then a query is needed for each type as described above.

What would be the best way to reduce the number of queries?

I just tried to use an OR operator, e.g.:

{ "*" : [], "id" : "/en/the_departed", "type" : [], "type|=" : [ "/film/film", "/award/award_winning_work" ] }

but it doesn't give the desired results. Is there some syntax error, or does the OR not work in this case?

Cheers, Christian