Cluster, Node, Index, Document, ID
Before mappings make sense you need the five nouns every Elasticsearch error message uses. If you know SQL, each one has a rough cousin there — rough, because the analogy breaks in a few useful places.
The rule
A cluster runs nodes; nodes hold indices; indices hold documents; each document has an ID.
| Elasticsearch | Rough SQL cousin | In our bookshop |
|---|---|---|
| Cluster | The whole database system | bookshop-prod, the full deployment |
| Node | One database server | es01, one running Elasticsearch process |
| Index | A database or table | books |
| Document | A row | One book, as JSON |
| ID | Primary key | "1" for The Quiet Garden |
- A cluster is one or more nodes that share a name and work together. You send a request to any node and the cluster answers as one.
- A node is a single running instance of Elasticsearch, usually one per machine or container.
- An index is a named collection of documents that share a structure. Names are lower-case:
books, notBooks. - A document is one JSON object — the unit you store, fetch and search.
- The ID (
_id) identifies a document inside its index. You can pick it, or let Elasticsearch generate a random one.
PUT /books/_doc/1
{ "title": "The Quiet Garden", "author": "Mira Das", "price": 12.5 }This one request touches all five nouns: it reaches some node, which acts for the whole cluster; it names the index books; _doc says "a document goes here"; 1 is the ID; and the JSON body is the document itself.
Where the analogy breaks: an index is looser than a table (documents may add new fields), there are no joins between indices, and an ID only has to be unique within one index. Book 1 and customer 1 can happily coexist in different indices.
The shortcut
Read any path from left to right and zoom in one level per segment: cluster (the address) → index → document ID.
The address
https://es.bookshop.dev:9200reaches some node, and through it the whole cluster.
Drills
Answer fast — trust the rule.
What is a node?
In GET /books/_doc/7, which part is the document ID?
The books index and the customers index each contain a document with ID 1. What happens?
Which is the closest SQL cousin of an Elasticsearch document?
Remember
- A cluster runs nodes; nodes hold indices; indices hold documents; each document has an ID.
- Read a path left to right: address → index → ID.
- IDs are unique within an index, and there are no joins between indices.
