Setting up a distributed search
Let us create a new Solr instance that we will use as a separate shard. Go to the directory where Solr is installed and create a copy of the example
folder, example2
. This creates a new instance of Solr where the index and schema are copied. Now start the Solr server inside the example2
folder. We have a new Solr instance running on port 8983. Our earlier instance is running on port 8080.
Note
The corresponding commands for Linux users are:
cd <Solr home> cp –r example example2 cd example2 java -jar start.jar –Djetty.port=8983
For Windows users, you can simply copy the example
folder using Windows Explorer and then run java-jar start.jar –Djetty.port=8983
in command prompt after cd
to example2
folder.
To kill an existing server press Ctrl + C on your command prompt where the Solr server is running.
To check the Solr instance go to http://localhost:8983/solr/
.
Since we have copied the index as well, the new instance of Solr will have all the documents...