[Developers] Query with : in id string returns an error
Dae Park
daepark at metaweb.com
Tue Jun 10 17:57:00 UTC 2008
English names don't directly translate into ids. To get the
definitive id of something with an english name:
[{
"name": "2001: A Space Odyssey",
"id": null,
"type": null
}]
this will return many things that have "2001: A Space Odyssey" as the
english name, like the film, soundtrack, etc.
So if you know the type you are looking for, (let's say film):
[{
"name": "2001: A Space Odyssey",
"id": null,
"type": "/film/film"
}]
will give you
[
{
"id" : "/guid/9202a8c04000641f8000000000042f26",
"name" : "2001: A Space Odyssey",
"type" : "/film/film"
}
]
On Jun 10, 2008, at 10:48 AM, Jesse Wang wrote:
> I try to use MQL read to do a query say for say "2001: A Space
> Odyssey", as
> in:
> {
> "*" : null,
> "id" : "/topic/en/2001:_a_space_odyssey"
> }
>
> but I got an error as:
> {
> "code" : "/api/status/error",
> "messages" : [
> {
> "code" : "/api/status/error/mql/type",
> "info" : {
> "expected_type" : "/type/id",
> "value" : "/topic/en/2001:_a_space_odyssey",
> "value_type" : "string"
> },
> "message" : "/topic/en/2001:_a_space_odyssey is a JSON
> string, but the
> expected type is /type/id"
> }
> ]
> }
> However, if I used words like "Bill Gates" (i.e. replacing
> "../en/2001:_a..." with "../en/bill_gates"), it works fine,
> escaping (%3A)
> doesn't seem to help, any ideas?
>
> Thanks.
> --
> Jesse
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
More information about the Developers
mailing list