[Developers] /wikipedia/en_id not giving results for redirected ids
Shug Boabby
shug.boabby at gmail.com
Wed Jul 23 22:40:38 UTC 2008
Hi all,
The following query will return the Freebase GUID for a Wikipedia
article with the given WPID (this corresponds to the "Spock" page).
{
"guid" : null,
"key" : {
"namespace" : "/wikipedia/en_id",
"value" : "53571"
}
}
However, the following returns null (this ID corresponds to the
"Mr_Spock" page, which redirects to "Spock").
{
"guid" : null,
"key" : {
"namespace" : "/wikipedia/en_id",
"value" : "3462975"
}
}
Why does this happen? How do I fix it?
I was expecting Freebase to return the GUID of the article that it
redirects to. Is there another way to achieve what I want? I don't
seem to be able to get *any* information for the redirected page...
this is quite concerning.
Consider the following (highly likely) series of events:-
- I obtain the wpid for an article and persist it to disc
- several days/weeks/months later, that record is pulled up and
freebase is queried
- the wpid is no longer a "primary" id, it is now a redirect and
therefore all Freebase API queries fail against it, and I have no way
to update the wpid
That seems pretty broken to me. How do I protect against this?
I had thought I could use the Freebase API to do Wikipedia ID
resolution with something like:-
{
"a:key" : {
"namespace" : "/wikipedia/en_id",
"value" : "3462975"
},
"b:key" : {
"namespace" : "/wikipedia/en_id",
"value" : null
}
}
but this is not going to work if the redirected articles are not
present on Freebase.
More information about the Developers
mailing list