Hello, the following query should return all german streets, which have a Commons-sitelink, but no Commonscat-Property (P373):
SELECT ?item ?commonscat ?sitelink WHERE { ?item wdt:P31 wd:Q79007. # Innerortsstraße ?item wdt:P17 wd:Q183. # Deutschland ?sitelink schema:about ?item . ?sitelink schema:isPartOf <https://commons.wikimedia.org/> . OPTIONAL {?item wdt:P373 ?commonscat } FILTER (!bound(?commonscat)) # nur jene OHNE commonscat-Property (P373) }
The query currently returns sometimes 22/23, sometimes 30 entries, depening when and how often the query is executed, allthough the objects have not been changed inbetween. Although the objects actually have a commonscat-Property, so they should not be listed at all in the result set, i.e. the result set actually should be empty.
For just one city (e.g. ?item wdt:P131 wd:Q61724. ) the query returns 2, 3 or 4 entries if the query is repeatedly executed.
Could this be a caching/indexing problem? Why are entries with commonscat-properties listed, while they should be filtered out?
- https://www.wikidata.org/wiki/Q100417069?action=purge A purge to some objects did not change anything
- Using https://byabbe.se/2018/01/26/cache-busting-wikidata-sparql-queries Cache Busting ( SELECT ?item ?commonscat ?sitelink (MD5(CONCAT(STR(?item), STR(RAND()))) as ?random) WHERE { ) does not change anything.
- https://replag.toolforge.org/ Replag currently shows no problems.
According to this discussion
another user has spotted a similar issue with a different query.
Also see
Thanks a lot!