Thank you for your quick answer.

The two parameters createNodeSet and createNodeSet.shuffle seem to solve the 
problem:

http://localhost:8983/solr/admin/collections?action=CREATE&name=mycollection&numShards=3&router.name=implicit&shards=shard1,shard2,shard3&router.field=shard&createNodeSet=node1,node2,node3&createNodeSet.shuffle=false

Best Regards,
Martin Mois

-----Ursprüngliche Nachricht-----
Von: Erick Erickson [mailto:erickerick...@gmail.com] 
Gesendet: Mittwoch, 10. Juni 2015 17:45
An: solr-user@lucene.apache.org
Betreff: Re: How to assign shard to specifc node?

Take a look at the collections API CREATE command in more detail here:
https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api1

Admittedly this is 5.2 but you didn't mention what version of Solr you're using.
In particular the createNodeSet and createNodeSet.shuffle parameters.

Best,
Erick

On Wed, Jun 10, 2015 at 8:31 AM, MOIS Martin (MORPHO) <martin.m...@morpho.com> 
wrote:
> Hello,
>
> I have a cluster with 3 nodes (node1, node2 and node3). Now I want to create 
> a new collection with 3 shards using `implicit` routing:
>
>     
> http://localhost:8983/solr/admin/collections?action=CREATE&name=mycoll
> ection&numShards=3&router.name=implicit&shards=shard1,shard2,shard3&ro
> uter.field=shard
>
> How can I control on which node each shard gets created? The goal is to 
> create shard1 on node1, shard2 on node2, etc..
>
> The background is that the actual raw data the index is created for should 
> reside on the same host. That means I have a "raw" record composed of 
> different data (documents, images, meta-data, etc.) for which I compute a 
> Lucene "document" that gets indexed. In order to reduce network traffic I 
> want to process the "raw" record on node1 and insert the resulting Lucene 
> document into shard1 that resides on node1. If shard1 would reside on node2, 
> the Lucene document would have to be send from node1 to node2 which causes 
> for big record sets a lot of inter node communication.
>
> Thanks in advance.
>
> Best Regards,
> Martin Mois
> #
> " This e-mail and any attached documents may contain confidential or 
> proprietary information. If you are not the intended recipient, you are 
> notified that any dissemination, copying of this e-mail and any attachments 
> thereto or use of their contents by any means whatsoever is strictly 
> prohibited. If you have received this e-mail in error, please advise the 
> sender immediately and delete this e-mail and all attached documents from 
> your computer system."
> #
#
" This e-mail and any attached documents may contain confidential or 
proprietary information. If you are not the intended recipient, you are 
notified that any dissemination, copying of this e-mail and any attachments 
thereto or use of their contents by any means whatsoever is strictly 
prohibited. If you have received this e-mail in error, please advise the sender 
immediately and delete this e-mail and all attached documents from your 
computer system."
#

Reply via email to