Expose the 3rd parameter of op.fromSPARQL
llinggit opened this issue · 3 comments
This is for bug 56465. The new 3rd parameter is options, which could be dedup or base. Need to expose this parameter in Java Client API.
const op = require('/MarkLogic/optic');
op.fromSPARQL('PREFIX ad: http://marklogicsparql.com/addressbook# '+
'SELECT ?firstName '+
'WHERE {<#5555> ad:firstName ?firstName .}'
, 'sparql', {dedup:'on',base:'http://marklogicsparql.com/id#'})
.result();
So we can address your issue, please include the following:
Version of MarkLogic Java Client API
See Readme.txt
Version of MarkLogic Server
See admin gui on port 8001 or run xdmp:version() in Query Console - port 8000)
Java version
Run java -version
OS and version
For MAC, run sw_vers.
For Windows, run systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
For Linux, run cat /etc/os-release and uname -r
Input: Some code to illustrate the problem, preferably in a state that can be independently reproduced on our end
Actual output: What did you observe? What errors did you see? Can you attach the logs? (Java logs, MarkLogic logs)
Expected output: What specifically did you expect to happen?
Alternatives: What else have you tried, actual/expected?
I believe that the only thing missing is to write a unit test using PlanBuilder.sparqlOptions()
OK, will add.
When setting duplicate to true, it works, but when setting it to false, it returns 6 results instead of 2.
PlanSparqlOptions options = pb.sparqlOptions().withDeduplicated(false).withBase("http://marklogicsparql.com/id#");