Smalyshev added a comment.

I this also the original query says: produce paintings which have creator and 
also don't have any creators who are painters and also don't have creators who 
are anonymous. I'm not sure if that was the original intent or maybe I 
misunderstand, but I'd say the query that says "produce paintings which have 
creators who are not anonymous and are not listed as painters" makes more 
sense. Such query may look like this:

  prefix wdt: <http://www.wikidata.org/prop/direct/>
  prefix entity: <http://www.wikidata.org/entity/>
  SELECT ?item WHERE {
    ?item wdt:P31 entity:Q3305213 .
    ?item wdt:P170 ?creator .
    FILTER NOT EXISTS {
      ?creator wdt:P106 entity:Q1028181 .
    }
    FILTER ( ?creator != entity:Q4233718 )
    FILTER ( !isBlank(?creator) )
  } LIMIT 10

and seems to run fast. I understand that this is not a direct translation from 
WDQ, and I'll also add handling of Q4294967294 to wdq2sparql, but looks like 
for some queries auto-translation may not be the optimal route.


TASK DETAIL
  https://phabricator.wikimedia.org/T100089

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Smalyshev
Cc: Smalyshev, Lucie, Aklapper, JanZerebecki, Multichill, Sylvain_WMFr, 
AlexWang, jkroll, Wikidata-bugs, Jdouglas, aude, Daniel_Mietchen, Manybubbles, 
daniel, Qgil



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to