Why is dbpedia-owl:wikiPageRedirects not returning the full set of redirect links? (Sparql)

I am using the following query :

select ?value where { <http://dbpedia.org/resource/Paris>  dbpedia-owl:wikiPageRedirects* ?value } 

in order to retrieve the wikiPageRedirects property of Paris.


Based on dbpedia Paris has more than 20 redirect links. Why am I only retrieving the first one?



Solution 1:

Your direction was wrong.

select distinct *
where { 
  ?x dbpedia-owl:wikiPageRedirects <http://dbpedia.org/resource/Paris>
} 

Solution 2:

Artemis's answer is right; the "direction" in the query is wrong. It's worth explaining that a bit more, though. On the DBpedia "page", you'll see lots of data like:

dbpedia-owl:area      105400000.000000 (xsd:double)  
dbpedia-owl:country   dbpedia:France  
dbpedia-owl:inseeCode 75056 (xsd:integer)  
dbpedia-owl:mayor     dbpedia:Anne_Hidalgo

These mean that DBpedia contains triples where these are the predicates and objects. That is, DBpedia contains a triple:

dbpedia:Paris dbpedia-owl:country dbpedia:France

On other hand, you'll also see things like "is … of":

is dbpedia-owl:beatifiedPlace of dbpedia:Daniel_Brottier
is dbpedia-owl:billed         of dbpedia:René_Duprée

These mean that dbpedia:Paris the object of triples with these subjects and predicates. E.g., DBpedia contains the triple

dbpedia:René_Duprée dbpedia-owl:billed dbpedia:Paris

The redirects properties that you're seeing are like this:

is dbpedia-owl:wikiPageRedirects of dbpedia:City_of_Love_(city)
                                    dbpedia:Département_de_Paris
                                    dbpedia:Departement_de_Paris
                                    dbpedia:FRPAR

That means that there are a bunch of triples of the form:

?something dbpedia-owl:wikiPageRedirects dbpedia:Paris

and that means that your query needs to be

select ?resource where {
  ?resource dbpedia-owl:wikiPageRedirects dbpedia:Paris
}

SPARQL results