[Developers] Looking for Beyonce
Christopher R. Maden
crism at metaweb.com
Wed Nov 7 06:04:09 UTC 2007
Arthur van Hoff wrote:
> How do I query for an artist either by name or by alias? Section
> 3.2.20 of the documentation mentions that there is no way to express
> an OR relationship. I need to match against either an alias or a
> name because some bands don't have their name listed as an alias.
You may want to try using the search API instead of MQL for these kinds
of queries.
If you want or need to use direct MQL, you will need to execute two
queries. You can send them in one envelope or two, depending on your
requirements; i.e., you could look for the name first, and if it fails,
then send back a query for the alias, or you could send two queries, one
for the name and one for the alias, and then see what you found.
This is kind of what the search API is optimized for. The best examples
of how to use it are in the freebase-suggest wiki: <URL:
http://code.google.com/p/freebase-suggest/wiki/FreebaseAPISearch >.
~Chris
--
Christopher R. Maden
Data Architect
Metaweb Technologies, Inc.
<URL: http://www.metaweb.com/ >
More information about the Developers
mailing list