View Source

{section}
{column:width=80%}
SolrCloud is a set of Solr features that expands the capabilities of Solr's distributed search, enabling and simplifying the creation and use of Solr clusters. SolrCloud is still under active development, but already supports the following features:

* Central configuration for the entire cluster

* Automatic load balancing and fail-over for queries

* Zookeeper integration for cluster coordination and configuration

{column}
{column:width=20%}
{panel:borderStyle=solid|borderColor=#000000|borderWidth=2|bgColor=#f3f3e9}
!LWE_logo_cropped.png|align=center!
{center}This functionality is available in *LucidWorks Enterprise* but not LucidWorks Cloud.{center}
{panel}
{column}
{section}

{anchor:cloud-examples}

h1. Solr Cloud Examples

Solr Cloud is currently an expert level API in development, and the current state is documented on the [SolrCloud wiki page|http://wiki.apache.org/solr/SolrCloud]. The documentation for the specific SolrCloud version included with this version of LucidWorks Enterprise is [here|http://wiki.apache.org/solr/SolrCloud?action=recall&rev=32].

LucidWorks Enterprise command line start and stop is a bit different than the example server included in Apache Solr. Some changes are needed to follow along with the Solr examples.

* Instead of {{java \-jar start.jar}}, use {{./start.sh}} or {{./start.bat}} and use the command line paramater -lwe_core_java_opts to pass additional command line options to the JVM.

* We recommend that you only install LWE using the installer application; copying the LucidWorksEnterprise directory to another directory to create another server may cause conflicts with ports.

* The Solr config directory in LucidWorks Enterprise is {{./conf/solr/cores/collection1_0/conf}} as opposed to {{./solr/conf}}

* Queries should include an additional query parameter {{&distrib=true}} to submit the search to multiple shards.

Here is how one would set up the SolrCloud [Example A: Simple two shard cluster|http://wiki.apache.org/solr/SolrCloud#Example_A:_Simple_two_shard_cluster].

Because we need two servers for this example, we will make two installations of LucidWorks Enterprise, one in {{example}} and the other in {{example2}} . The installation in {{example}} should use port 8983 for LWE Core (selected in the installer). The installation in {{example2}} should use the default port (8888) for LWE Core. If enabling other components, be sure to run them on different ports in each installation as well.

The original Apache Solr instructions look like this:

{code:borderStyle=solid|borderColor=#666666}
cd example
java -Dbootstrap_confdir=./solr/conf -Dcollection.configName=myconf -DzkRun -jar start.jar
{code}

Equivalent LucidWorks Enterprise instructions for Linux-based systems:

{code:borderStyle=solid|borderColor=#666666}
cd example
bin/start.sh -lwe_core_java_opts "-Dbootstrap_confdir=./solr/cores/collection1_0/conf -Dcollection.configName=myconf -DzkRun"

cd ../example2
bin/start.sh -lwe_core_java_opts "-DhostPort=8888 -Dcollection.configName=myconf -DzkHost=localhost:9983"

{code}

For Windows-based systems:

{code:borderStyle=solid|borderColor=#666666}
cd example
bin\start.bat -lwe_core_java_opts "-Dbootstrap_confdir=./solr/cores/collection1_0/conf -Dcollection.configName=myconf -DzkRun"

cd ../example2
bin\start.bat -lwe_core_java_opts "-DhostPort=8888 -Dcollection.configName=myconf -DzkHost=localhost:9983"

{code}

Browse to [http://localhost:8983/solr/collection1/admin/zookeeper.jsp|http://localhost:8983/solr/collection1/admin/zookeeper.jsp] to see the state of the cluster (the zookeeper distributed filesystem).

{scrollbar}