我想将我的系统每个文件和文件夹信息索引到 solr 中。 solr 中有没有处理程序可以做到这一点?
我可以使用以下命令使用数据导入处理程序索引任何文件
curl "http://localhost:8983/solr/update/extract?ext.idx.attr=true\&ext.def.fl=text&commit=true"-F "myfile=@tmp1.txt"
但我想将我的整个系统索引到 solr 中。
最佳答案
看起来可以通过http://wiki.apache.org/solr/DataImportHandler#FileListEntityProcessor来完成,您可以指定
fileName :(required) A regex pattern to identify files
baseDir : (required) The Base directory (absolute path)
recursive : Recursive listing or not. Default is 'false'
如果将 fileName 指定为“*”,baseDir 指定为“/”,recursive 指定为“true”,则看起来它将枚举所有文件。
关于java - 将我的硬盘索引到 solr,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26138764/