Tomcat SOLR multiple cores setup

前端 未结 2 814
时光说笑
时光说笑 2020-12-14 21:07

I have spend all morning trying to set up multiple cores on a SOLR installation that runs under Apache Tomcat server without success. My solr.xml looks like this:

         


        
2条回答
  •  被撕碎了的回忆
    2020-12-14 21:41

    Check that your instanceDir values are relative to -Dsolr.solr.home. If -Dsolr.solr.home is 'multicore', then your instanceDir should be only "core0".

    If you put your data folder inside your instanceDir, you should not have to specify its path:

    
    
    
        
        
    
    
    

    You should not have to set anything in solrconfig.xml. But if you need to configure an handler independantly of the core location, you can use the variable ${solr.core.instanceDir}.

    UPDATE

    To set the solr.solr.home variable with Tomcat, use the JAVA_OPTS environment variable before starting Tomcat:

    JAVA_OPTS="-Dsolr.solr.home=multicore"
    export JAVA_OPTS
    tomcat/bin/catalina.sh start
    

    Make sure that "multicore" is correctly set relative to the working directory. Per example, if solr.solr.home='multicore', you have to launch Tomcat from the directory where "multicore" is located.

提交回复
热议问题