diff --git a/packages/network-of-terms-catalog/catalog/queries/lookup/goudatijdmachine-straten.rq b/packages/network-of-terms-catalog/catalog/queries/lookup/goudatijdmachine-straten.rq index 4b7a4f497..e027898c7 100644 --- a/packages/network-of-terms-catalog/catalog/queries/lookup/goudatijdmachine-straten.rq +++ b/packages/network-of-terms-catalog/catalog/queries/lookup/goudatijdmachine-straten.rq @@ -1,4 +1,4 @@ -PREFIX dcterms: +PREFIX sdo: PREFIX skos: PREFIX gtm: PREFIX schema: @@ -17,21 +17,18 @@ CONSTRUCT { # Kapelstraat: VALUES ?uri { ?uris } ?uri a gtm:Straat ; - dcterms:identifier ?identifier ; - skos:prefLabel ?prefLabel . - FILTER (CONTAINS(STR(?uri), "ark:")) + sdo:identifier ?identifier ; + sdo:name ?prefLabel . + FILTER (STRSTARTS(STR(?uri), "https://n2t.net/ark:/60537/")) OPTIONAL { - ?uri skos:altLabel ?altLabel - } - OPTIONAL { - ?uri hg:liesIn/schema:sameAs # Gouda - BIND("Straat in Gouda" AS ?scopeNote) + ?uri sdo:alternateName ?altLabel } + BIND ( CONCAT( IF ( EXISTS { ?entity omeka:item_set }, "Verdwenen straat", "Straat" )," in Gouda") AS ?scopeNote ) OPTIONAL { ?uri hg:absorbedBy|hg:absorbed ?related_uri . ?related_uri a gtm:Straat ; - skos:prefLabel ?related_prefLabel . - FILTER (CONTAINS(STR(?related_uri), "ark:") && ?uri != ?related_uri ) + sdo:name ?related_prefLabel . + FILTER (STRSTARTS(STR(?related_uri), "https://n2t.net/ark:/60537/") && ?uri != ?related_uri ) } } LIMIT 100 diff --git a/packages/network-of-terms-catalog/catalog/queries/search/goudatijdmachine-straten.rq b/packages/network-of-terms-catalog/catalog/queries/search/goudatijdmachine-straten.rq index c05545a04..a49640873 100644 --- a/packages/network-of-terms-catalog/catalog/queries/search/goudatijdmachine-straten.rq +++ b/packages/network-of-terms-catalog/catalog/queries/search/goudatijdmachine-straten.rq @@ -1,8 +1,10 @@ -PREFIX dcterms: PREFIX skos: PREFIX gtm: -PREFIX schema: +PREFIX sdo: PREFIX hg: +PREFIX luc: +PREFIX luc-index: +PREFIX omeka: CONSTRUCT { ?uri a skos:Concept ; @@ -11,23 +13,25 @@ CONSTRUCT { skos:scopeNote ?scopeNote ; skos:related ?related_uri . ?related_uri skos:prefLabel ?related_prefLabel . -} -WHERE { - ?uri a gtm:Straat ; - dcterms:identifier ?identifier ; - skos:prefLabel ?prefLabel . - OPTIONAL { ?uri skos:altLabel ?altLabel . } - OPTIONAL { - ?uri hg:liesIn/schema:sameAs # Gouda - BIND("Straat in Gouda" AS ?scopeNote) - } +} WHERE { + ?search a luc-index:straten_index ; + luc:query ?query ; + luc:entities ?uri . + + FILTER (STRSTARTS(STR(?uri), "https://n2t.net/ark:/60537/")) + + ?uri sdo:identifier ?identifier ; + sdo:name ?prefLabel ; + luc:score ?score . + + BIND ( CONCAT( IF ( EXISTS { ?entity omeka:item_set }, "Verdwenen straat", "Straat" )," in Gouda") AS ?scopeNote ) + + OPTIONAL { ?uri sdo:alternateName ?altLabel . } + OPTIONAL { ?uri hg:absorbedBy|hg:absorbed ?related_uri . ?related_uri a gtm:Straat ; - skos:prefLabel ?related_prefLabel . - FILTER (CONTAINS(STR(?related_uri), "ark:") && ?uri != ?related_uri ) + sdo:name ?related_prefLabel . + FILTER (STRSTARTS(STR(?related_uri), "https://n2t.net/ark:/60537/") && ?uri != ?related_uri ) } - FILTER (CONTAINS(STR(?uri), "ark:")) - FILTER (CONTAINS(LCASE(?prefLabel),?query) || CONTAINS(LCASE(?altLabel),?query) ) -} -LIMIT 100 \ No newline at end of file +} ORDER BY DESC(?score) LIMIT 100 \ No newline at end of file