Apache Solr open-source search software
SOLR-3625: better info in example conigs about <lib/> and how order might matter
Chris M. Hostetter70bbb347fc41
diff --git a/solr/example/solr/collection1/conf/solrconfig.xml b/solr/example/solr/collection1/conf/solrconfig.xmlindex a5d1ecb74e4..7221ccdb0d9 100755--- a/solr/example/solr/collection1/conf/solrconfig.xml+++ b/solr/example/solr/collection1/conf/solrconfig.xml@@ -37,7 +37,7 @@--><luceneMatchVersion>LUCENE_50</luceneMatchVersion>- <!-- lib directives can be used to instruct Solr to load an Jars+ <!-- <lib/> directives can be used to instruct Solr to load an Jarsidentified and use them to resolve any "plugins" specified inyour solrconfig.xml or schema.xml (ie: Analyzers, RequestHandlers, etc...).@@ -45,6 +45,12 @@All directories and paths are resolved relative to theinstanceDir.+ Please note that <lib/> directives are processed in the order+ that they appear in your solrconfig.xml file, and are "stacked"+ on top of each other when building a ClassLoader - so if you have+ plugin jars with dependencies on other jars, the "lower level"+ dependency jars should be loaded first.+If a "./lib" directory exists in your instanceDir, all filesfound in it are included as if you had used the followingsyntax...@@ -55,26 +61,25 @@<!-- A 'dir' option by itself adds any files found in the directoryto the classpath, this is useful for including all jars in adirectory.- -->- <!--- <lib dir="../add-everything-found-in-this-dir-to-the-classpath" />- -->- <!-- When a 'regex' is specified in addition to a 'dir', only the+ When a 'regex' is specified in addition to a 'dir', only thefiles in that directory which completely match the regex(anchored on both ends) will be included.++ The examples below can be used to load some solr-contribs along+ with their external dependencies.-->- <lib dir="../../../dist/" regex="apache-solr-cell-\d.*\.jar" /><lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />+ <lib dir="../../../dist/" regex="apache-solr-cell-\d.*\.jar" />- <lib dir="../../../dist/" regex="apache-solr-clustering-\d.*\.jar" /><lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />+ <lib dir="../../../dist/" regex="apache-solr-clustering-\d.*\.jar" />- <lib dir="../../../dist/" regex="apache-solr-langid-\d.*\.jar" /><lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />+ <lib dir="../../../dist/" regex="apache-solr-langid-\d.*\.jar" />- <lib dir="../../../dist/" regex="apache-solr-velocity-\d.*\.jar" /><lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />+ <lib dir="../../../dist/" regex="apache-solr-velocity-\d.*\.jar" /><!-- If a 'dir' option (with or without a regex) is used and nothingis found that matches, it will be ignored@@ -82,8 +87,8 @@<lib dir="/total/crap/dir/ignored" /><!-- an exact 'path' can be used instead of a 'dir' to specify a- specific file. This will cause a serious error to be logged if- it can't be loaded.+ specific jar file. This will cause a serious error to be logged+ if it can't be loaded.--><!--<lib path="../a-jar-that-does-not-exist.jar" />