Page MenuHomePhabricator

wikidata redirects cause problems with queries
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Run the query

SELECT ?x ?s WHERE {

BIND ( wd:Q560380 AS ?x )
?x wdt:P279+ ?s .
}

What happens?:

Only one result
wd:Q560380 wd:Q122093335

What should have happened instead?:

Many results, and different, particularly
wd:Q560380 wd:Q324233
wd:Q324233 wd:Q719226

What appears to have happened is that the Wikidata Query Service is not picking up on the redirect from wd:Q122093335 to wd:Q324233 that came from some merge.

Software version (skip for WMF-hosted wikis like Wikipedia):

unknown - current version of Wikidata Query service and Wikidata as of 6 September 2023

Other information (browser name/version, screenshots, etc.):

Event Timeline

The query service doesn’t automatically follow redirects – they’re modeled as owl:sameAs triples, but don’t have any effect beyond that (you would have to use that predicate explicitly in your query). On Wikidata, there is a bot that will regularly update statements with redirected values to point to the redirect target instead (after a waiting period, one week I believe, during which the merge can be easily reverted if it was incorrect), so the query should start to return more results soon.