June 2017
Beginner to intermediate
404 pages
8h 22m
English
We discussed before that an index contains one or more shards. During indexing, the document ID is used to determine which shard the document belongs to, using a simple formula as follows:
hash(document_id) % no_of_shards
To retrieve a document using the document ID, the same formula is used to determine the shard the document belongs to, and the document is retrieved:

When executing a search query, the node that receives the request is known as the coordinating node. The coordinating node (Node2) sends the query to all the shards of the index, aggregates the results, and sends them back to the client.
By default, a query has to ...
Read now
Unlock full access