SparqlHelper's hasType method generates a query to check whether the given entity is an instance of the provided "class" entity or any of its subclasses. Here is an example of the query, containing some real values, which should return true:
PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> ASK { BIND(wd:Q124 AS ?item) VALUES ?class { wd:Q18602249 } ?item wdt:P279* ?class. }
When run on the current version of the query service (using Blazegraph), it returns true, and does so very quickly. (query link)
When run against https://query-next.wikidata.org/sparql, it runs for about 30 seconds and results in a server error: {"details":"Error id e7dce717-3e96-4f1c-9651-829ac94a8646-5","stack":""}
When run against https://qlever.dev, it results in a timeout, which is presumably the cause of the server error on query-next. (query link)
Steps to Reproduce
- On qlever.dev try https://qlever.dev/wikidata/aUrOX9
- Observe timeout
Additional Info
Omitting the * from the query (which is what recursively checks subclasses), qlever.dev responds quickly, without a timeout error. (query link)
Notes:
- From T433705: [BLZMI] SPIKE - How to have a local setup that uses wikidata.org data, current recommended approach is to run QLever locally
