Search code examples
apacheindexingsolrlucene

Apache Solr index a folder (and underfolders)


I've googled a lot and I haven't found a good solution yet.

I want to index a folder who has a lot of files and underfolders. But I don't get it how to index it, I think there has to be a path or so anywhere in the config, but I haven't found one. Please don't roast me I'm new with solr. ;)


Solution

  • Try Post tool with -Drecursive param

    lets say folder(test) inside two csv files and one subfolder(test2) inside it few more csv files. post tool recursively check for all files inside folder test and its subfolder test2 for indexing.

    java -Dtype=text/csv -Dc=collection1 -Drecursive -jar post.jar test
    

    -Dauto param will index all file types that tika can process.

    java -DDauto -Dc=collection1 -Drecursive -jar post.jar test