You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2010/02/01 00:03:36 UTC

[Solr Wiki] Trivial Update of "SolrCloud" by YonikSeeley

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SolrCloud" page has been changed by YonikSeeley.
The comment on this change is: snapshot: more work on demo + docs.
http://wiki.apache.org/solr/SolrCloud?action=diff&rev1=19&rev2=20

--------------------------------------------------

  
  If you haven't yet, go through the simple [[http://lucene.apache.org/solr/tutorial.html|Solr Tutorial]] to familiarize yourself with Solr.
  
- Solr embeds and uses ZooKeeper as a repository for cluster configuration and coordination - think of it as a distributed filesystem.
+ Solr embeds and uses Zookeeper as a repository for cluster configuration and coordination - think of it as a distributed filesystem.
  
  Since we'll need two solr servers for this example, simply make a copy of the example directory for the second server.
  {{{
@@ -51, +51 @@

  
   * {{{-Djetty.port=7574}}}  is just one way to tell the Jetty servlet container to use a different port.
   * {{{-DhostPort=7574}}} tells Solr what port the servlet container is running on.
-  * {{{-DzkHost=localhost:9983}}} points to the ZooKeeper ensemble containing the cluster state.  In this example we're running a single ZooKeeper server embedded in the first server.  By default, an embedded ZooKeeper server runs at the solr port plus 1000, so 9983.
+  * {{{-DzkHost=localhost:9983}}} points to the Zookeeper ensemble containing the cluster state.  In this example we're running a single Zookeeper server embedded in the first Solr server.  By default, an embedded Zookeeper server runs at the Solr port plus 1000, so 9983.
  
+ If you refresh the zookeeper browser, you should now see both shard1 and shard2 in collection1.
+ 
+ Next, index some documents to each server:
+ {{{
+ cd exampledocs
+ java -Durl=http://localhost:8983/solr/collection1/update -jar post.jar ipod_video.xml
+ java -Durl=http://localhost:7574/solr/collection1/update -jar post.jar monitor.xml
+ }}}
+ 
+ And now, a request to either server with "distrib=true" results in a distributed search that covers the entire collection:
+ 
+ http://localhost:8983/solr/collection1/select?distrib=true&q=*:*
  
  == ZooKeeper ==
+ Multiple Zookeeper servers running together for fault tolerance and high availability is called an ensemble.  For production, it's recommended that you run an external zookeeper ensemble rather than having Solr run embedded servers.
+ 
+ When Solr runs an embedded zookeeper server, it defaults to using the solr port plus 1000 for the zookeeper client port.  In addition, it defaults to adding one to the client port for the zookeeper server port, and two for the zookeeper leader election port.  So in the first example with Solr running at 8983, the embedded zookeeper server used port 9983 for the client port and 9984,9985 for the server ports.
+ 
  == Distributed Request ==
  Explicitly specify the addresses of shards you want to query: