[英]solr import files from multiple dataSource entity
我正在嘗試從多個文件夾導入文件。
我的solrconfig.xml
調用以下文件以將其與org.apache.solr.handler.dataimport.DataImportHandler
結合使用。
<dataConfig>
<dataSource type="BinFileDataSource" />
<document>
<entity name="files1"
dataSource="null"
rootEntity="false"
processor="FileListEntityProcessor"
baseDir="/w/PDF/"
fileName=".*\.(pdf)|(doc)|(docx)|(ppt)|(pptx)|(xls)|(xlsx)|(odf)|(txt)|(rtf)|(html)|(htm)|(jpg)"
onError="skip"
recursive="true">
<field column="fileAbsolutePath" name="id" />
<field column="fileSize" name="size" />
<field column="fileLastModified" name="lastModified" />
<field column="file" name="fileName"/>
<entity
name="documentImport1"
processor="TikaEntityProcessor"
url="${files.fileAbsolutePath}"
format="text">
<field column="file" name="fileName"/>
<field column="Author" name="author" meta="true"/>
<field column="title" name="title" meta="true"/>
<field column="text" name="text"/>
<copyField source="content" dest="text"/>
</entity>
</entity>
<entity name="files2"
dataSource="null"
rootEntity="false"
processor="FileListEntityProcessor"
baseDir="/w/KNOW-HOW/"
fileName=".*\.(pdf)|(doc)|(docx)|(ppt)|(pptx)|(xls)|(xlsx)|(odf)|(txt)|(rtf)|(html)|(htm)|(jpg)"
onError="skip"
recursive="true">
<field column="fileAbsolutePath" name="id" />
<field column="fileSize" name="size" />
<field column="fileLastModified" name="lastModified" />
<field column="file" name="fileName"/>
<entity
name="documentImport2"
processor="TikaEntityProcessor"
url="${files.fileAbsolutePath}"
format="text">
<field column="file" name="fileName"/>
<field column="Author" name="author" meta="true"/>
<field column="title" name="title" meta="true"/>
<field column="text" name="text"/>
<copyField source="content" dest="text"/>
</entity>
</entity>
</document>
</dataConfig>
導入期間,我得到FileNotFoundException
。
我想念什么?
只需將代碼更改為第二個實體: ${files.fileAbsolutePath}
到${files2.fileAbsolutePath}
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.