【发布时间】:2018-11-18 14:44:51
【问题描述】:
在the instructions 之后,我设置了一个涵盖多个(文字)谓词的索引:
PREFIX luc: <http://www.ontotext.com/owlim/lucene#>
INSERT DATA {
luc:index luc:setParam "uris" .
luc:include luc:setParam "literals" .
luc:moleculeSize luc:setParam "1" .
luc:includePredicates luc:setParam "http://purl.org/dc/terms/title http://www.w3.org/2000/01/rdf-schema#label http://www.w3.org/2004/02/skos/core#prefLabel http://www.w3.org/2004/02/skos/core#altLabel" .
}
和
PREFIX luc: <http://www.ontotext.com/owlim/lucene#>
INSERT DATA {
luc:${Cfg.literalIndex} luc:createIndex "true" .
}
这部分似乎工作得很好。我现在的问题是,有什么方法可以在我的 SPARQL 查询中获取匹配的谓词或文字?
所以假设以下数据:
:exA rdfs:label 'label' ;
dct:title 'title' .
我想做这样的事情
SELECT *
WHERE {
?needle luc:labelIndex "title" ;
luc:predicate ?predicate ;
?predicate ?label .
}
如果存在类似luc:predicate 的内容,这可以为我提供实际匹配的谓词以及匹配值。但是,我什至不确定 Lucene 索引谓词,这是启用此类功能所必需的。
【问题讨论】: