0

我想将 Dbpedia 数据集索引到 SOLR 中。

  1. 我为此目的的架构是:schema.xml
  2. 我的 DIH 配置是:data-config.xml

一切都好,但我想要所有“类型”而不是最后一个“类型”。有没有办法用 DIH 更新 Solr?我不是说三角洲进口

更多解释:

<field column="rawLine" 
      regex="THE SAMPLE REGEX"
      groupNames="uri,types,prettyTypes" />

上面的配置得到每一行,然后使用该正则表达式进行处理,最后 (uri,types,prettyTypes) 填充适当的数据。但例如对于“Alabama”,我们在 Dbpedia 的数据集中有 6 行:

<http://dbpedia.org/resource/Alabama> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/AdministrativeRegion> .
<http://dbpedia.org/resource/Alabama> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/AdministrativeArea> .
<http://dbpedia.org/resource/Alabama> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/PopulatedPlace> .
<http://dbpedia.org/resource/Alabama> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Place> .
<http://dbpedia.org/resource/Alabama> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Place> .
<http://dbpedia.org/resource/Alabama> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . 

现在这 6 行用 DIH 处理后,将只有 1 个带有 (Alabama, owl#Thing) 数据的 doc,其他 5 个类型将被删除。

4

0 回答 0