[Developers] Limiting prefix searches
John Giannandrea
jg at metaweb.com
Mon Sep 15 19:58:40 UTC 2008
There are several ways to do this, some better documented than others.
The simplest is with MQL:
[{"artist
":"Nirvana
","name":null,"name~=":"^Never*","release_date":null,"type":"/music/
album"}]
You can also use the "surrounds" feature of search to find things that
have a link to something else with a specific name.
http://www.freebase.com/api/service/search?callback=done&type=/music/album&prefix=nevermi&surrounds=Nirvana
There is a new version of search coming soon which implements custom
MQL output and post filtering but its not available yet.
-jg
On Sep 15, 2008, at 10:00 AM, Alf Eaton wrote:
> I'm using Freebase Suggest to autocomplete music artists, albums and
> track names, and would like to be able to limit album and track title
> searches by the previously selected artist.
>
> For example, this is currently possible:
> http://www.freebase.com/api/service/search?callback=done&type=/music/artist&prefix=nirvan
>
> I'd like to be able to take the guid of an artist from that set of
> results and use it to limit a subsequent album query, which currently
> (without the limits) looks like this:
> http://www.freebase.com/api/service/search?callback=done&type=/music/album&prefix=nevermi
>
> I see there's an mql_filter parameter mentioned in the response, but
> can't find any documentation...
>
> Is it possible to add further limits to a prefix search, or maybe even
> to perform a prefix search using mqlread?
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
More information about the Developers
mailing list