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

Inconsistency while searching literal terms and triples with literals #38

Open
dinikolop opened this issue Jan 18, 2019 · 1 comment
Open

Comments

@dinikolop
Copy link
Contributor

When somebody wants to run searchTerms for a literal prefix that includes (part of) its datatype, they should specify the bracket(s). However, removing the bracket(s) will not return suggestions.

On the other hand, calling searchTriples for a literal with its bracketed datatype, you won't get back results. Calling with no brackets is the only way to get results:

Returns results?
doc.searchTerms({prefix: '"a"^^<ab', position: 'object'}) Yes
doc.searchTerms({prefix: '"a"^^ab', position: 'object'}) No
doc.searchTriples(null, null, '"a"^^<abc>') No
doc.searchTriples(null, null, '"a"^^abc') Yes

I think there should results in all cases in order to avoid this inconsistency. What do you think @RubenVerborgh ?
I can push at #37 , since I noticed during applying requested changes there.

@RubenVerborgh
Copy link
Member

RubenVerborgh commented Jan 18, 2019

Hmm, the assumption is that the library takes a valid RDF Term in the (old) N3.js representation. No validation is performed, so the behavior of invalid terms is undefined.

If we can fix the above as part of #37, I don't mind, but I wouldn't spend any CPU cycles on validation.

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

2 participants