Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

有这样一个路径ftp://192.168.10.21/upload/,我想用本地的solr索引该路径下的所有文件。

在data-config.xml中尝试如下配置:

<dataSource name="binary" type="BinFileDataSource" />
<entity name="ftp" processor="TikaEntityProcessor" url="ftp://192.168.10.21/upload/" dataSource="binary" fileName=".*.*" onError="skip" recursive="true">
    <field column="title" meta="true" name="fileName"/>
</entity>

在dataimport的过程中会报错,不能成功建立索引,而如果把entity中的url改为某个具体的文件,
如ftp://192.168.10.21/upload/abc.docx,则可以成功索引。
求教各位大神,想要批量索引该目录的所有文件应该如何正确配置


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
212 views
Welcome To Ask or Share your Answers For Others

1 Answer

type不能是BinFileDataSource,这个代表本地文件,改成URLDataSource


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...