"optimize=0" 时 属性 路径的不完整 sem:sparql 结果
Incomplete sem:sparql results for Property Paths when "optimize=0"
考虑以下 subClassOf 关系:
m1
|_ m1_1
|_ m1_1_1
下面查询正确 returns m1_1 和 m1_1_1:
sem:sparql('
SELECT *
WHERE {
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ <http://example.org/people#m1> .
}', (),
("optimize=1"))
但是下面的查询只有returns m1_1:
sem:sparql('
SELECT *
WHERE {
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ <http://example.org/people#m1> .
}', (),
("optimize=0"))
*.也是如此
升级到 MarkLogic 8.0-5.2 后,以前的 sem:sparql 查询 return 正确的结果,但当对象是参数时则不是。例如。以下查询没有 return 任何内容:
sem:sparql('
SELECT *
WHERE {
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ ?item .
}',
(map:new ((map:entry ("item", sem:iri("http://example.org/people#m1"))))),
("optimize=0"))
使用 MarkLogic 8.0-5.2 检查相当复杂的 RDFS ontology,这似乎工作正常。可以升级吗?围绕 8.0-4.0 有一些重要的语义工作。
以下是一些可能的解决方法:
sem:sparql('
SELECT *
WHERE {
BIND (?param AS ?item) .
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ ?item .
}',
(map:new ((map:entry ("param", sem:iri("http://example.org/people#m1"))))),
("optimize=0"))
或者
sem:sparql('
SELECT *
WHERE {
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ ?item .
FILTER (?item = ?param) .
}',
(map:new ((map:entry ("param", sem:iri("http://example.org/people#m1"))))),
("optimize=0"))
考虑以下 subClassOf 关系:
m1
|_ m1_1
|_ m1_1_1
下面查询正确 returns m1_1 和 m1_1_1:
sem:sparql('
SELECT *
WHERE {
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ <http://example.org/people#m1> .
}', (),
("optimize=1"))
但是下面的查询只有returns m1_1:
sem:sparql('
SELECT *
WHERE {
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ <http://example.org/people#m1> .
}', (),
("optimize=0"))
*.也是如此
升级到 MarkLogic 8.0-5.2 后,以前的 sem:sparql 查询 return 正确的结果,但当对象是参数时则不是。例如。以下查询没有 return 任何内容:
sem:sparql('
SELECT *
WHERE {
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ ?item .
}',
(map:new ((map:entry ("item", sem:iri("http://example.org/people#m1"))))),
("optimize=0"))
使用 MarkLogic 8.0-5.2 检查相当复杂的 RDFS ontology,这似乎工作正常。可以升级吗?围绕 8.0-4.0 有一些重要的语义工作。
以下是一些可能的解决方法:
sem:sparql('
SELECT *
WHERE {
BIND (?param AS ?item) .
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ ?item .
}',
(map:new ((map:entry ("param", sem:iri("http://example.org/people#m1"))))),
("optimize=0"))
或者
sem:sparql('
SELECT *
WHERE {
?s <http://www.w3.org/2000/01/rdf-schema#subClassOf>+ ?item .
FILTER (?item = ?param) .
}',
(map:new ((map:entry ("param", sem:iri("http://example.org/people#m1"))))),
("optimize=0"))