Search code examples
sparqldbpedia

Querying Transitive Relations


I'm playing with SPARQL and trying to query all direct and indirect influences of Stephen King from dbpedia, but I can't get the query working.

I saw that one can normally use "+" to query transitive relations, but the query I wrote return exactly the same as a query that ignores transitive relations. Here is what I've tried: query-transitive-influencedBy

Another thing that I've tried which works (at least partially) is: query-transitive-influencedBy-v2. This works, however it has two drawbacks: 1. Returns people that have influenced Stephen King, but also have the influencedBy relation themselves. And by doing this reduces the total count of data returned. 2. Returns data for only direct and indirect influencers for one level.

What would be the correct way to query such data?


Solution

  • There was an encoding issue in the old http://dbpedia.org/snorql which caused the + to be filtered out. I have fixed the problem.