Elasticsearch is a search engine built on top of Apache Lucene.
It is:
- A NoSQL document store (stores JSON documents)
- Designed for full-text search, filtering, and analytics
- Scalable and distributed
- It is accessible from RESTful web service interface
You store documents, not rows like in SQL.
🧱 Key Concepts
🖥️ Node
- A Node is a single running instance of Elasticsearch.
- A single physical or virtual server can host multiple nodes, depending on the system’s resources like RAM, storage, and CPU.
🧮 Cluster
A Cluster is a collection of one or more nodes that together hold your data and provide distributed search and indexing capabilities.
Why Clusters?
- 🔁 Scalability — Add more nodes to increase capacity.
- 🛡 Fault Tolerance — If one node fails, others continue operating.
📦 Core Terms in Elasticsearch
| Concept |
Description |
| Index |
Like a table in SQL. A collection of documents |
| Document |
A single JSON object — like a row in SQL. Every document has a unique ID (UID) |
| Field |
A key-value pair in a document |
| Mapping |
Like a schema: defines field types |
| Query |
How you search documents |
🧩 Shard