Apache solr contrib and dist path
When you have solr deployed in tomcat the contrib/dist paths in solrconfig.xml get all messed up.
Set JAVA_OPTS with an extra param:
-Dsolr.exlib.dir=<location to contrib>
Then in solrconfig.xml do this:
<lib dir="${solr.exlib.dir:}/contrib/extraction/lib" regex="..jar" />
<lib dir="${solr.exlib.dir:}/dist/" regex="solr-cell-\d..jar" />
<lib dir="${solr.exlib.dir:}/contrib/clustering/lib/" regex=".*\.jar" />
<lib dir="${solr.exlib.dir:}/dist/" regex="solr-clustering-\d.*\.jar" />
<lib dir="${solr.exlib.dir:}/contrib/langid/lib/" regex=".*\.jar" />
<lib dir="${solr.exlib.dir:}/dist/" regex="solr-langid-\d.*\.jar" />
<lib dir="${solr.exlib.dir:}/contrib/velocity/lib" regex=".*\.jar" />
<lib dir="${solr.exlib.dir:}/dist/" regex="solr-velocity-\d.*\.jar" />
Now you can move the config around without haveing to hack up solrconfig.xml everytime!
Written by charlie
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Solr
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#