Does a query have preference for other nodes shards?


(Onilton Maciel) #1

I have 4 nodes with 4 shards in each nodes.

node 1 - s1 s2 s3 s4
node 2 - s1 s2 s3 s4
node 3 - s1 s2 s3 s4
node 4 - s1 s2 s3 s4

Does a query issued to node1 get forwarded to all shards in node 1 or just
one shard of this node?

Can it be directed to more then one shard in node 1? Or to all of them?


(Clinton Gormley) #2

On Fri, 2012-02-24 at 21:36 -0400, Onilton Maciel wrote:

I have 4 nodes with 4 shards in each nodes.

node 1 - s1 s2 s3 s4
node 2 - s1 s2 s3 s4
node 3 - s1 s2 s3 s4
node 4 - s1 s2 s3 s4

Does a query issued to node1 get forwarded to all shards in node 1 or
just one shard of this node?

Shards are round robin'ed (i think). Your query would be forwarded to
s1,s2,s3,s4 but these shards may be on any of the nodes in your cluster.

Can it be directed to more then one shard in node 1? Or to all of
them?

See search preference:
http://www.elasticsearch.org/guide/reference/api/search/preference.html


(system) #3