ld-r
ld-r copied to clipboard
facet browser: not possible to query numbers/booleans/...
When I want to query resources with literal values that are not strings (e.g. integers, booleans, etc.), I cannot query them. If I look to the query, I see that LD-R treats the value in the SPARQL query as a string instead of a number/boolean/... :
SELECT DISTINCT ?s ?title WHERE {
{
SELECT DISTINCT ?s WHERE {
?s rdf:type ?type .
FILTER (?type=<https://w3id.org/bot#Site> || ?type=<https://w3id.org/bot#Building> || ?type=<https://w3id.org/bot#Storey> || ?type=<https://w3id.org/bot#Space> || ?type=<https://w3id.org/bot#Element>) ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?v1.
?s <https://w3id.org/props#elevation_simple> ?v2.
FILTER ((?v1=<https://w3id.org/bot#Element>) && (?v2="""1.399999999999999"""))
}
LIMIT 30 OFFSET 0
}
OPTIONAL {
?s rdfs:label ?title .
} OPTIONAL {
FILTER langMatches( lang(?title), "EN" )
}
}
in the facet config, if you add ldr:dataType property, that data type will overwrite the difficult string type. e.g. you can use: xsd:integer
Can you give me more hints or an example of where I should place what? Thanks :)