Nodes and shard chatter


(Paul Loy) #1

Hi Shay,

I was just wondering how searches are performed. I guess it's a kind of map
reduce where either each shard or each node is queried and then the
initiating node collates.

So what happens if for a particular index, you have more nodes than shards?
Say you have 3 nodes and 2 shards. Does a search operation still create 3
requests - one for each node - or does it only query the nodes with shards?

I'm just interested is all. No issues.

Thanks,

--

Paul Loy
paul@keteracel.com
http://uk.linkedin.com/in/paulloy


(Shay Banon) #2

It only queries nodes where the shards exists, it does not go to all the nodes each time. By default, round robin across replicas, but you can control that using the preference option: http://www.elasticsearch.org/guide/reference/api/search/preference.html.

On Saturday, June 4, 2011 at 5:13 PM, Paul Loy wrote:

Hi Shay,

I was just wondering how searches are performed. I guess it's a kind of map reduce where either each shard or each node is queried and then the initiating node collates.

So what happens if for a particular index, you have more nodes than shards? Say you have 3 nodes and 2 shards. Does a search operation still create 3 requests - one for each node - or does it only query the nodes with shards?

I'm just interested is all. No issues.

Thanks,

--

Paul Loy
paul@keteracel.com (mailto:paul@keteracel.com)
http://uk.linkedin.com/in/paulloy


(fashionalwallet) #3
  • deleted -

(system) #4