query-01274f25dc83b21532c876cecaa52904

rq turtle/ttl

Items that have UC Davis in the label extension. This extension uses another indexer (elasticsearch) to allow much better text searches. These are the SERVICE extensions below: CirrusSearchThe query below uses the

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?label
WHERE {
{
  SERVICE wikibase:mwapi
  {
    bd:serviceParam wikibase:endpoint "www.wikidata.org";
                    wikibase:api "Generator";
                    mwapi:generator "search";
                    mwapi:gsrsearch "inlabel:university_of_California_davis"@en;
                    mwapi:gsrlimit "max".
    ?item wikibase:apiOutputItem mwapi:title.
  }
  ?item rdfs:label ?label. FILTER( LANG(?label)="en" )

} UNION {
    SERVICE wikibase:mwapi
  {
    bd:serviceParam wikibase:endpoint "www.wikidata.org";
                    wikibase:api "Generator";
                    mwapi:generator "search";
                    mwapi:gsrsearch "inlabel:UC Davis"@en;
                    mwapi:gsrlimit "max".
    ?item wikibase:apiOutputItem mwapi:title.
  }
  ?item rdfs:label ?label. FILTER( LANG(?label)="en" )
}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?label"):::projected c5(["www.wikidata.org"]):::literal c11([sinlabel:university_of_California_davis^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"]):::literal c13(["max"]):::literal c17([sinlabel:UC Davis^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"]):::literal c9(["search"]):::literal c3(["bd:serviceParam"]):::iri c15(["mwapi:title"]):::iri c7(["Generator"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; f0[["?label = 'en'"]] f0 --> v1 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c3 --"mwapi:endpoint"--> c5 c3 --"mwapi:api"--> c7 c3 --"mwapi:generator"--> c9 c3 --"mwapi:gsrsearch"--> c17 c3 --"mwapi:gsrlimit"--> c13 v2 --"mwapi:apiOutputItem"--> c15 end v2 --"rdfs:label"--> v1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; f1[["?label = 'en'"]] f1 --> v1 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c3 --"mwapi:endpoint"--> c5 c3 --"mwapi:api"--> c7 c3 --"mwapi:generator"--> c9 c3 --"mwapi:gsrsearch"--> c11 c3 --"mwapi:gsrlimit"--> c13 v2 --"mwapi:apiOutputItem"--> c15 end v2 --"rdfs:label"--> v1 end union0r <== or ==> union0l end