[Developers] /wikipedia/en_id not giving results for redirected ids
Kurt Bollacker
kurt at metaweb.com
Wed Jul 23 23:02:20 UTC 2008
I guess Brian beat me to that suggestion.
On Wed, Jul 23, 2008 at 11:01:33PM +0000, Kurt Bollacker wrote:
>
> On Wed, Jul 23, 2008 at 11:40:38PM +0100, Shug Boabby wrote:
> > 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?
>
> If you store "Mr_Spock" beside "3462975", you could use:
>
> {
> "a:key" : {
> "namespace" : "/wikipedia/en_id",
> "value" : null
> },
> "guid" : null,
> "key" : {
> "namespace" : "/wikipedia/en",
> "value" : "Mr_Spock"
> }
> }
>
> Which returns:
>
> {
> "a:key" : {
> "namespace" : "/wikipedia/en_id",
> "value" : "53571"
> },
> "guid" : "#9202a8c04000641f8000000000068479",
> "key" : {
> "namespace" : "/wikipedia/en",
> "value" : "Mr_Spock"
> }
> }
>
> You now get the numeric wpid of the actual article and the freebase
> GUID.
>
>
> Kurt :-)
>
More information about the Developers
mailing list