Step 1:
Go to your solr directory.
cd /opt/solr141/
sudo mkdir home1
copy contents into home1 directory from other home directory.
sudo cp -a /opt/justbooks/solr141/home/. /opt/justbooks/solr141/home1
Step 2:
create solr1.xml under tomcat6/conf/catalina/localhost. (<your url>/solr1)
Copy from solr.xml and just change
value to point to new home dir in environment tag
<Context docBase="/opt/solr/solr141/dist/apache-solr-1.4.1.war" debug="0" crossContext="true" > <Environment name="solr/home" type="java.lang.String" value="/opt/solr/solr141/home1" override="true" /> </Context>
Step 3:
In
/opt/solr/solr141/home1/conf/Solr-config.xml
<dataDir>${solr.data.dir:/opt/solr/solr141/home2/data}</dataDir> <locktype>simple</locktype> <unlockonstartup>true</unlockonstartup>
Step 4:
Restart tomcat
Step 5:
Since we copied from other home folder, we need to clean up the index
curl localhost:7585/solr3/update --data '*:*' -H 'Content-type:text/xml; charset=utf-8'
No comments:
Post a Comment