mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Make nearby query faster (#2419)
* Make nearby query faster * Fix query
This commit is contained in:
parent
a9629c6f99
commit
5a6402cd07
5 changed files with 5 additions and 36 deletions
|
|
@ -5,7 +5,6 @@ SELECT
|
|||
(SAMPLE(?classId) as ?class)
|
||||
(SAMPLE(COALESCE(?class_label_preferred_language, ?class_label_any_language, "?")) as ?class_label)
|
||||
(SAMPLE(COALESCE(?icon0, ?icon1)) as ?icon)
|
||||
(SAMPLE(COALESCE(?emoji0, ?emoji1)) as ?emoji)
|
||||
?wikipediaArticle
|
||||
?commonsArticle
|
||||
(SAMPLE(?Commons_category) as ?Commons_category)
|
||||
|
|
@ -33,13 +32,6 @@ SELECT
|
|||
OPTIONAL {?classId rdfs:label ?class_label_preferred_language. FILTER (lang(?class_label_preferred_language) = "${LANG}")}
|
||||
OPTIONAL {?classId rdfs:label ?class_label_any_language}
|
||||
|
||||
# Get icon
|
||||
OPTIONAL { ?classId wdt:P2910 ?icon0. }
|
||||
OPTIONAL { ?classId wdt:P279*/wdt:P2910 ?icon1. }
|
||||
# Get emoji
|
||||
OPTIONAL { ?classId wdt:P487 ?emoji0. }
|
||||
OPTIONAL { ?classId wdt:P279*/wdt:P487 ?emoji1. }
|
||||
|
||||
OPTIONAL {
|
||||
?wikipediaArticle schema:about ?item ;
|
||||
schema:isPartOf <https://${LANG}.wikipedia.org/> .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue