On 12/23/2013 05:43 PM, Greg Preston wrote:
I believe you can just define multiple cores:
<core default="true" instanceDir="shard1/"
name="collectionName_shard1" shard="shard1"/>
<core default="true" instanceDir="shard2/"
name="collectionName_shard2" shard="shard2"/>
...
(this is the old style solr.xml. I don't know how to do it in the newer style)
Yes, that is exactly what I did but somehow, the link between shards and
collections gets lost and everything gets very confused.
I guess I should have read more carefully about the valid parameters on
the <core> element. My problem was a missing attribute:
@collection="collection-name"
So the complete core definition that survives tomcat restarts:
<core name="core_shard_1"
collection="collection-name"
instanceDir="/solr/instance/dir"
config="solrconfig-standard.xml"
dataDir="/solr/data/dir/core_shard_1"
/>
David