How does Elasticsearch query by text so fast?

I have been learning about Elasticsearch for some time now.

I want to see if the following statement es correct:

Elasticsearch manages such high speeds because you can split data that is in the same index between several nodes that will take a GET query and run it at the same time.

Meaning if I have three pieces of data in the "book" index

{"name": "Pinocchio"}
{"name": "Frozen"}
{"name": "Diary of A Wimpy Kid"}

And I decide to give the cluster three nodes, each node will hold one of the three books and therefore speed up my get request 3x?

>Solution :

Yes, there’s much more to it, but that’s pretty much what happens behind the scene.

Provided your index has three primary shards and each shard lands on a different node and contains one of the documents in your question, when you execute a query on your index, the query gets broadcast to each of the shards of your index and is executed on each node in parallel to search the documents on that node.

Leave a Reply