How Elasticsearch Works

A-Dem
4 min readApr 1, 2024

On our way home from work, we remember that we need to buy some milk. We see a supermarket and decide to stop in, but as soon as we enter, we are greeted by rows and rows of aisles and shelves, making it impossible for us to find the milk.

However, the supermarket has a digital map. With a simple search for the product we want, in our case the milk, the digital map quickly shows where is the milk located, giving us the details of the aisle, shelf number and all the information we need.

Elasticsearch explained
Elasticsearch explained

The same way that “digital map” is used in the store to locate products we want, Elasticsearch is used in web applications, to find the information we need, fast, even if there are millions of data on that web application.

Elasticsearch organizes data by storing these data (or products in our example) in indexes (indices), which are then divided into shards.

These shards are distributed across nodes in the cluster, and it does that because of the scalability, fault tolerance, and fast search and retrieval of data.

The best way to explain this would be the picture below:

Elasticsearch in action
How Elasticsearch Works

--

--

A-Dem

Writing for fun! Tech, non-tech, funny, self improvement, devops, developing, coding etc...