Solr Jena TDB/Fuseki文本搜索索引:自定义每个字段的URI位置
我有一个相对较小的三重存储,我通过Jena Fuseki存储和访问。以下是我的数据片段,但可能会出现更多可选字段:Solr Jena TDB/Fuseki文本搜索索引:自定义每个字段的URI位置,solr,full-text-search,jena,triplestore,fuseki,Solr,Full Text Search,Jena,Triplestore,Fuseki,我有一个相对较小的三重存储,我通过Jena Fuseki存储和访问。以下是我的数据片段,但可能会出现更多可选字段: <http://example.com/#org1> a pers:family ; pers:name [ pers:lang "de" ; pers:occurence "XX" ; p
<http://example.com/#org1>
a pers:family ;
pers:name [ pers:lang "de" ;
pers:occurence "XX" ;
pers:surname "NN" ;
pers:type "std" ;
pers:var_id <http://example.com/#org1.01>
] ;
pers:org_type "Family" .
<http://example.com/#per1>
a pers:person ;
pers:first_mentions [ pers:first_mention "1234" ;
pers:occurence "XX"
] ;
pers:name [ pers:forename "Maria" ;
pers:id <http://example.com/#per1a> ;
pers:lang "de" ;
pers:occurence "XX" ;
pers:org_id <http://example.com/#org1> ;
pers:type "std"
] ;
pers:name [ pers:forename "Marie" ;
pers:lang "fr" ;
pers:occurence "XX" ;
pers:org_var_id <http://example.com/#org1.01> ;
pers:type "orig" ;
pers:var_id <http://example.com/#per1a.01>
] ;
pers:org_id <http://example.com/#org1> ;
pers:sex "1" .
它输出的smth如下所示:
{
"responseHeader":{
"status":0,
"QTime":16,
"params":{
"q":"*Mari*",
"indent":"true",
"wt":"json"}},
"response":{"numFound":39,"start":0,"docs":[
{
"uri":["_:6fdab61c39c226f305e6419d6aa5f5e9"],
"forename":["Maria"],
"id":"c3f82e8c-9650-4a18-b6c3-1eaebff9830c",
"_version_":1515091600962748416} }}
[text:field "forename" ; text:predicate pers:forename ; text:entityField <pattern for finding URI of the forename field>]
<pattern for finding URI of the forename field>
URI pers:name [text:field "forename"]
空白节点被引用为URI。因此,我了解到,根据我的配置文件,数据的索引方式是“text:entityField”uri“将查找“text:predicate”的主语。当我在索引中查询“Mari”时,在字段“forename”中找到了该事件,它的主题是一个空白节点。但是对于将来的带有索引的工作,即面向方面,我需要实体的URI(例如),因为我不能使用空白节点ID进行查询,因此我找不到它们引用的条目。p>
如何索引数据,以便对每个字段的Solr进行不同的区分,它的URI在哪里?例如,如果索引字段为“forename”,则其URI的查找方式如下:
{
"responseHeader":{
"status":0,
"QTime":16,
"params":{
"q":"*Mari*",
"indent":"true",
"wt":"json"}},
"response":{"numFound":39,"start":0,"docs":[
{
"uri":["_:6fdab61c39c226f305e6419d6aa5f5e9"],
"forename":["Maria"],
"id":"c3f82e8c-9650-4a18-b6c3-1eaebff9830c",
"_version_":1515091600962748416} }}
[text:field "forename" ; text:predicate pers:forename ; text:entityField <pattern for finding URI of the forename field>]
<pattern for finding URI of the forename field>
URI pers:name [text:field "forename"]
[文本:字段“forename”;文本:谓词:forename;文本:entityField]
URI pers:name[文本:字段“forename”]
关于空白节点成为URI的< /代码>。您使用的是哪种版本的jena?URI字段是“应该……”,它应该恢复空白节点。@ ANDYS我使用Jena Fuseki 1.1.0。空白节点的恢复是什么意思?有没有办法从这个id中获得有用的信息?jena文本与数据集结合使用。资源(空白节点)可用于访问数据集中的数据集和模型。如果您希望在数据之外有一个标识符,这就是URI far的作用,而不是空节点。@AndyS但当我使用Solr为数据集编制索引时,我无法访问数据集中的索引,可以吗?据我在Fuseki文档中看到的,它只适用于Lucene。这是否意味着我只能使用Lucene索引,而不能使用Solr?