On 11/18/2013 3:53 PM, Beale, Jim (US-KOP) wrote:
> I shouldn't be configuring the replication handler?  I didn't know that!
> 
> The documentation describes how to do it, e.g., for Solr 4.6
> 
> https://cwiki.apache.org/confluence/display/solr/Index+Replication
> 
> Now I'm evenmore confused than ever.  If a replication handler isn't defined, 
> then I get "replication handler isn't defined" errors in the logs, and the 
> added core fails to do anything.

The replication handler must be *defined* -- but not actually
configured.  SolrCloud handles all replication details itself -
assigning master and slave designations and initiating any replication
that is required are handled dynamically at the moment they are needed,
not in solrconfig.xml.

The following is what I have for replication config on my SolrCloud
setup.  This is all you need.

<requestHandler name="/replication" class="solr.ReplicationHandler">
</requestHandler>

XML generally allows you to use "/>" to end the opening tag and remove
the closing tag, but I haven't done that with my config.

> It seems like such a simple task: create 1 sharded and 1 unsharded core.
> 
> But nothing I've tried so far works.  Why can't numShards be a property of 
> the core???

The numShards parameter is a property of the *collection*.  It's not
something that gets defined at the core level.  When you create your
collection using the collections API, you can include the numShards
parameter.  For an unsharded collection, use numShards=1.

Thanks,
Shawn

Reply via email to