solr imports jars for individual cores

Some summary of importing jars for solr

      Most of the data import methods on the Internet are to copy the jar directly to the lib directory of solr. Of course, when learning and testing, this is no problem, but when we actually deploy solr in the production environment, it is usually a virtual directory. To install, reference solr.war directly. The advantage of this deployment is that the deployment of the application can be separated from tomcat, ensuring future upgrade maintenance and application expansion.

      Therefore, the official recommendation is as follows, for example:

     

 Enter the home/conf directory to edit solrconfig.xml

 Add the following code

<lib dir="../../lib" regex=".*\.jar" />
<lib dir="../../lib" regex="IKAnalyzer2012FF_u1.jar" />

 It should be noted here: the relative location above does not refer to the relative path relative to the current solrconfig.xml, but the relative path relative to the core where the file solrcong.xml is located. For example, my solrconfig.xml exists in /home/ik/conf/solrcofing. xml then my path is ../../lib instead of ../../../lib

 

        

    

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326418391&siteId=291194637