Thanks Andra. Is there no way to proactively without using a 2nd outer query to constrain the query within the WHERE clause? To help with faster query response? In other words, hitting some index so that only publishers containing "simon" are returned.
I'm having to relearn some of this after being away from WDQS for some time. Thad https://www.linkedin.com/in/thadguidry/ On Fri, May 31, 2019 at 3:56 AM Andra Waagmeester <[email protected]> wrote: > Yes that is indeed my experience as well. > You can process the results but then in a SELECT within a SELECT query. > > This works: > SELECT * WHERE { > {SELECT ?item ?itemLabel WHERE { > ?item wdt:P31 wd:Q2085381. > > SERVICE wikibase:label { bd:serviceParam wikibase:language > "[AUTO_LANGUAGE],en". } > > }} > FILTER(CONTAINS(LCASE(?itemLabel), "simon")) > } > > Note the omission of the second FILTER. I suspect that the results of the > service return labels without language tags. > > On Fri, May 31, 2019 at 8:12 AM Nicolas VIGNERON < > [email protected]> wrote: > >> Hi Thad, >> >> Did it ever works? >> It was my understanding that if you want to manipulate the label (or the >> description, or the alias), you need to explicitly call it and that the >> SERVICE was for display only. At least, this is with this assumption that I >> always wrote my query (or explained during SPARQL workshops) :/ >> Anyway, this query works : >> >> SELECT ?item ?itemLabel WHERE { >> ?item wdt:P31 wd:Q2085381 ; rdfs:label ?itemLabel . >> FILTER(CONTAINS(LCASE(?itemLabel), "simon")) >> FILTER (LANG(?itemLabel)="en") >> } >> >> Cheers, >> ~nicolas >> >> Le ven. 31 mai 2019 à 03:05, Thad Guidry <[email protected]> a écrit : >> >>> My Query: >>> >>> SELECT ?item ?itemLabel WHERE { >>> ?item wdt:P31 wd:Q2085381. >>> >>> SERVICE wikibase:label { bd:serviceParam wikibase:language >>> "[AUTO_LANGUAGE],en". } >>> # FILTER(CONTAINS(LCASE(?itemLabel), "simon")) >>> # FILTER (LANG(?itemLabel)="en") >>> } >>> >>> and if I enable any of the FILTER lines, it returns 0 results. >>> What changed / Why ? >>> >>> Thad >>> https://www.linkedin.com/in/thadguidry/ >>> _______________________________________________ >>> Wikidata mailing list >>> [email protected] >>> https://lists.wikimedia.org/mailman/listinfo/wikidata >>> >> _______________________________________________ >> Wikidata mailing list >> [email protected] >> https://lists.wikimedia.org/mailman/listinfo/wikidata >> > _______________________________________________ > Wikidata mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikidata >
_______________________________________________ Wikidata mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata
