Time for action – testing SolrCloud and Zookeeper locally

Every Solr instance now also includes an embedded Zookeeper instance, so we can start our experimentation with that, and then move to a more robust configuration with an external Zookeeper server.

  1. We can start from the default example in the Solr distribution. We can write the following command:
    >> cd ~/SolrStarterBook/solr/example
  2. Then we can start the first SolrCore instance using the configuration for the arts core:
    >> java -DzkRun -DnumShards=2 -Dbootstrap_confdir=../../solr-app/chp07/arts/conf/ -jar start.jar
  3. We can then start two more instances, with a slightly different choice of parameters:
    >> java -Djetty.port=7777 -DzkHost=localhost:9983 -jar start.jar
    >> java -Djetty.port=8888 ...

Get Apache Solr Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.