Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

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:

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

This should result in:

No Format
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:

Code Block
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:

Code Block
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