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

FILTER regex prefix filter should ignore " #249

Closed
niklas88 opened this issue May 15, 2019 · 3 comments
Closed

FILTER regex prefix filter should ignore " #249

niklas88 opened this issue May 15, 2019 · 3 comments
Assignees

Comments

@niklas88
Copy link
Member

In QLever regex prefix filtering needs an escaped " like so FILTER regex(?qlc_name, "^\"state") this isn't conforming to the spec however. The regex should only be applied withing the literal. Thus the regex filter that works in QLever doesn't in Blazegraph. In QLever however we can also use it to efficiently filter IRIs which should still be possible as it can be quite useful.

@niklas88
Copy link
Member Author

I think for the IRI matching we want to support something like FILTER regex(str(?foo), "<bla") where for us str() is almost a no-op but signals we don't want to add the "

@niklas88
Copy link
Member Author

niklas88 commented May 16, 2019

Ok I have now verified that the following FILTER regex() examples work on Blazegraph with Wikidata and I think we should try to make QLever compatible with that syntax.

Standard SPARQL
For IRIs:

FILTER regex(str(?predicate), "^http://www.w3.org/2000/01/rdf-schema#la") .

For Literals

FILTER regex(?name, "^Ala") .

Instead QLever currently needs the following

For IRIs:

FILTER regex(?predicate, "^<http://www.w3.org/2000/01/rdf-schema#") .

For literals:

FILTER regex(?name, "^\"Ala") .

@hannahbast
Copy link
Member

Done since #962

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

No branches or pull requests

3 participants