Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

facet browser: not possible to query numbers/booleans/... #50

Open
mathib opened this issue May 4, 2018 · 2 comments
Open

facet browser: not possible to query numbers/booleans/... #50

mathib opened this issue May 4, 2018 · 2 comments
Labels

Comments

@mathib
Copy link

mathib commented May 4, 2018

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" )
  }
}
@ali1k ali1k added the question label May 15, 2018
@ali1k
Copy link
Owner

ali1k commented May 15, 2018

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

@mathib
Copy link
Author

mathib commented May 15, 2018

Can you give me more hints or an example of where I should place what? Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants