1.How to add a datanode to an existing Solr instance ?
Ans: In order to add a datanode to an existing Solr instance, you would first create a solr home directory and then point the server to the correct zookeeper host.
STEPS
- mkdir <solr.home for the new solr node>
- cp <existing solr.xml path> <new solr.home> [Note: the solr.xml file is located in the conf/ directory]
- bin/solr start -cloud -s solr.home/solr -p <port num> -z <zk hosts string>
2. How does Indexing work in Solr ?
Ans: Once Solr receives a document for indexing, following are the stages that it goes through:
- Using the ‘Solr Sharding Algorithm’ a Shard is determined to send the new Document.
- The Document then gets forwarded to the ‘Shard Leader’ and it is assigned with a version.
- The Shard Leader creates indexes for the document and forwards the document Asynchronously to all Replicas of the Shard.