Reputation: 32808
I am currently storing a collection of documents to one Solr server via SolrServer.add(Collection<SolrInputDocument> docs). I want to shard the server into e.g. shards. Is it possible to use this Collection-adding method and picking the correct shard based on each single document in this collection?
My simple sharding strategy is to pick the correct shard, by using the hashCode/modulo method like described in http://wiki.apache.org/solr/DistributedSearch.
uniqueId.hashCode() % numServers
Update
OK, I have found a distributed update processor in https://issues.apache.org/jira/browse/SOLR-2355, but maybe there is a simpler way?
Upvotes: 1
Views: 771
Reputation: 32808
OK, finally I ended up with a mapping I stored in the database regarding the data entities I use. So I map entity to Solr instances.
Upvotes: 1