Skip to content

Other command line options

haschart edited this page Mar 23, 2017 · 2 revisions

Other command line options

-solrj "directory to look in for jars required for SolrJ" 
-lib_local  "directory to look in for additional jars and libraries" 

The "-solrj" option specifies where the jar files that comprise SolrJ can be found. The default value is simply "lib-solrj" which is then looked-for in the list of directories specified for the "-dir" option. Since recent Solr distributions include the solr-solrj-X.X.X.jar in the solr/dist directory with all of the solr jars, but then place the jars on which solrj depends in a subdirectory named solrj-lib, you can merely specify "path_to_solr/dist/solrj-lib" as the value for this option, and if it cannot find solr-solrj-X.X.X.jar in that directory, it will look in the parent directory specifically for that one jar file.

The "-lib_local" option specifies where jar files needed by code within your custom indexing methods. The default value is simply "lib_local" which is then looked-for in the list of directories specified for the "-dir" option. For instance if one of your methods looked up a value in a MySQL database, the JDBC jars for communicating with MySQL would be placed in the lib_local directory. All jars in all of the expanded directory paths will be loaded by SolrMarc.

Java System properties

In addition to the values that can be specified via the above command-line options there are a number of special purpose System properties that can be defined on the command line using the the syntax -Dproperty=value that can affect the operation of SolrMarc. Many of these are for use by advanced users or for debugging or tuning purposes and may not be needed for most users.

 -Dsolrmarc.method.report=true  
         At program termination report the amount of time each indexing 
         method required
 -Dsolrmarc.indexer.threadcount=<int>  
         Number of parallel threads to use for indexing (defaults to 1)
         If your custom methods or custom index scripts are not thread-safe, a
         number higher than 1 may cause unexpected errors in your Solr records.
 -Dsolrmarc.solrj.threadcount=<int>    
         Number of parallel threads to use for sending data to Solr (defaults to 4)
 -DrunInEclipse=true            
         Solely for debugging shutdown hooks in Eclipse
 -Dsolrmarc.track.solr.progress=<true|false>
         whether to output a progress message at the end of each chunk of records 
         sent to Solr (defaults to  false)
 -Dsolrmarc.method.report=<true|false>
         whether to output a summary of how much time each indexing spec consumed  
         (defauls to false)
 -Dsolrmarc.indexer.chunksize=<int>
         the number of records to include in a single chunk of records being 
         sent to Solr (defaults to  640)