solr - 数据导入处理程序中 SolR 的 Tika 处理器未从 DB 处理器获取文件名
问题描述
我有一个 DIH 配置,我想通过将文件名从 db 传递给 Tika 来组合来自 DB 和 Tika 的数据。问题是 Tika 中的文件名是空的。日志说:
ERROR (Thread-16) [ ] o.a.s.h.d.DataImporter Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.RuntimeException: java.io.FileNotFoundException: Could not find file: (resolved to: C:\Users\jimbo\Desktop\solr-8.9.0\server\.
我的配置xml文件是这样的:
<dataConfig>
<dataSource name="ds-db" driver="org.mariadb.jdbc.Driver" url="jdbc:mysql://localhost:3306/eepyakm?user=root" user="root" password="wpadmin"/>
<dataSource name="ds-file" type="BinFileDataSource"/>
<document>
<entity name="supplier" query="select * from suppliers_tmp_view" dataSource="ds-db"
deltaQuery="select id from suppliers_tmp_view where last_modified > '${dataimporter.last_index_time}'"
deltaImportQuery="select * from suppliers_tmp_view where id='${dataimporter.delta.id}'">
<entity name="attachment" dataSource="ds-db"
query="select * from suppliers_tmp_files_view where supplier_tmp_id='${supplier.id}'"
deltaQuery="select id,supplier_tmp_id from suppliers_tmp_files_view where last_modified > '${dataimporter.last_index_time}'"
parentDeltaQuery="select id from suppliers_tmp_view where id='${attachment.supplier_tmp_id}'">
<field name="path" column="path"/>
<entity name="file" processor="TikaEntityProcessor" url="${attachment.path}" format="text" dataSource="ds-file">
<field column="text"/>
</entity>
</entity>
</entity>
</document>
</dataConfig>
我在一篇很老的帖子中发现了一个类似的问题:Solr's TikaEntityProcessor not working
解决方案
推荐阅读
- python - 具有第一个有效值的 Pandas groupby fillna(窗口函数)
- mongodb - 带有嵌套运算符的 Mongo 查询或管道
- spring - 如何在单元测试中解析包含属性的 SpEl 方程?
- javascript - 使用 Camunda 网络建模器的 javascript 导入和模型
- php - 在 htaccess 文件的 url 中使用虚拟目录
- python - 使用 pandas 根据自定义条件派生列
- apache-kafka - 如何减少分区占用的磁盘空间?
- cordova - 离子 3 的自定义使用权限
- c# - 如何在另一个页面中使用写在一个页面中的信息
- loops - 为什么没有终止条件的'for'循环永远一遍又一遍地打印值'0'?