Solr版本:: 6.6.1
我使用solr索引PDF文件,它正常工作正常 . 现在我需要在PDF文件上执行delta-import选项 . 最近添加到文件夹中的文件只应在data-import-handler操作期间处理 .
我无法找到使用 FileListEntityProcessor 实现delta-import的示例 .
请建议 .
data-config.xml文件看起来像这个 .
<dataConfig>
<dataSource type="BinFileDataSource"/>
<document>
<entity name="K1FileEntity" processor="FileListEntityProcessor"
dataSource="null"
recursive = "true"
baseDir="\\CLD02\RemoteDepot"
fileName=".*pdf" rootEntity="false">
<field column="file" name="id"/>
<!--<field column="fileAbsolutePath" name="path" />
<field column="fileSize" name="size" />-->
<field column="fileLastModified" name="lastmodified" />
<entity name="pdf" processor="TikaEntityProcessor"
onError="skip"
url="${K1FileEntity.fileAbsolutePath}" format="text">
<field column="title" name="title" meta="true"/>
<field column="dc:format" name="format" meta="true"/>
<field column="text" name="text"/>
</entity>
</entity>
</document>
</dataConfig>
1 回答
如上所述in the docs:
所以你需要:
转向使用一些java代码(使用Solrj)编制索引并滚动自己的delta导入infra
或实现FileListEntityProcessor的所有delta内容(并希望将其推入Solr),您可以使用SqlEntityProcessor代码作为指南 .