(使用 GraphDB 8.1 免费)。 http://graphdb.ontotext.com/documentation/free/full-text-search.html表示我可以通过实现接口com.ontotext.trree.plugin.lucene.AnalyzerFactory
,使用luc:analyzer
param 为 GraphDB full-text 搜索启用自定义 AnalyzerFactory。但是我无法在任何地方找到这个界面。它不在 jar graphdb-free-runtime-8.1.0.jar 中。
我在http://ontotext.com/products/graphdb/editions/#feature-comparison-table检查了特征矩阵,看来这个功能“连接器 Lucene”可用于免费版的 GraphDB。
com.ontotext.trree.plugin.lucene.AnalyzerFactory
接口位于哪个 jar 中?我需要在项目中导入什么才能实现此接口?
GraphDB 中是否包含 pre-existing AnalyzerFactories 以使用 Lucene 其他分析仪? (我有兴趣使用 FrenchAnalyzer)。
谢谢 !
1 回答
GraphDB 提供了两种不同的 Lucene-based 插件。
Lucene FTS 插件索引 RDF 分子,正确的文档链接是:http://graphdb.ontotext.com/documentation/free/full-text-search.html
Lucene Connector 使用诸如?subject propertyPath?object to id | fild value 之类的配置序列在 RDF 和 Lucene 文档模型之间执行在线同步。正确的文档链接是:http://graphdb.ontotext.com/documentation/free/lucene-graphdb-connector.html
我鼓励您使用 Lucene 连接器,除非您没有 RDF 分子的特殊情况。下面是一个简单的示例,如何使用法语分析器配置连接器,并为
urn:MyClass
类型的资源索引rdfs:label
谓词的所有值。选择一个存储库,并从 SPARQL 查询视图执行:然后从导入>文本区域手动添加一些示例测试数据:
提交事务后,Connector 将更新 Lucene 索引。现在您可以运行以下搜索查询:
要创建自定义分析器,请按照文档中的说明进行操作并扩展
org.apache.lucene.analysis.Analyzer
类。将自定义分析器 JAR 放在lib/plugins/lucene-connector/
路径中。