When you search against an index, the search will be executed across all shards. If you want to have fine grained control, you can use routing. When indexing / deleting you can provide an addition routing value, and when searching, you can provide a routing value(s) as well.
When using a routing value when indexing / deleting, its value is used instead of the id to decide which shard it will end up on (hashed).
When using routing value(s) when searching, the shard(s) those routing value(s) will match on will be searched.
On Thursday, March 31, 2011 at 11:51 PM, Otis wrote:
I can't seem to find the documentation about how ES shards documents
(and how one can control that), is this available anywhere?
Also, I'm looking for something that describes how ES avoids
scattering search requests to all nodes and how it knows how to
limit it only to a limited set of nodes, but also can't find that in
Could you please point me to the relevant docs so I can RTFM?