The SolrIndexer is a tool developed by Paul Ramirez to export a File Manager Catalog into Apache Solr.

To use the tool, from the File Manager ./bin deployment directory, run:

java -Djava.ext.dirs=../lib org.apache.oodt.cas.filemgr.tools.SolrIndexer

This should result in:

usage: java org.apache.oodt.cas.filemgr.tools.SolrIndexer
 -a,--all                     Index all items in catalog
 -cq,--catalogQuery <query>   Not yet implemented
 -d,--delete                  Delete items before indexing
 -fmu,--fmUrl <Filemgr URL>   URL to the CAS FileManager
 -h,--help                    Print this message
 -mf,--metFile <file>         Index this met file
 -o,--optimize                Optimize the Solr index when done
 -p,--product <productId>     Product id to index
 -su,--solrUrl <Solr URL>     URL to the Solr server

The command line arguments are fairly self descriptive. What's not is the config file that the tool takes that specifies the mapping of metadata fields from the File Manager Catalog. From this post and the work of Tom Bennett, we see that parameter is:

SOLR_INDEXER_CONFIG

Which takes a full file path to the indexer.properties file. You can find a sample file here

A sample full invocation of the tool is provided as:

java -DSOLR_INDEXER_CONFIG=/var/kat/katconfig/static/oodt/cas-filemgr/policy/indexer.properties
-Djava.ext.dirs=/usr/local/oodt/cas-filemgr/lib/ org.apache.oodt.cas.filemgr.tools.SolrIndexer
--all --fmUrl http://localhost:9101
  • No labels

2 Comments

  1. Based on discussions with Tom Bennett and thanks to Paul Ramirez for writing the tool and to Tom for helping to patch it and get it working again!