Elastic search is a distributed search and analytics engine, written in Java, and built on top of Apache Lucene.
It is distributed by nature, and highly scalable. It scales very well with increasing data volume and query throughput.
And at the same time, Elasticsearch provides an easy-to-access interface in the form of REST API.
Elasticsearch supports-
- Full-text search
- Realtime analytics
- Data aggregation and analysis
Primary use cases of Elasticsearch are-
- Search functionality in the application
- Data Analytics
- Log and monitoring( using ELK stack)
- Recommendation engine
In Elasticsearch data is stored as documents. Here is how the terms in Elasticsearch related to a relational database-
Elasticsearch Term | Relational Database (RDBMS) Equivalent | Description |
---|---|---|
Index | Database | An index contains multiple types of structured data. |
Type (deprecated) | Table | Type within an index works as a collection of documents. Types are deprecated in version 7.x. |
Document | Row | Document is the single basic unit of data in Elasticsearch. |
Field | Column | Field is the individual items/attributes within a document. |
Node | Database Server Instance | |
Cluster | Database Cluster | |
Replica | Replication | |
Analyzer | Full-Text Indexing | Analyzer processes text fields for searchability, just like full-text indexing works in RDBMS. |
Shard | Partition | |
Query DSL | SQL | Query language for Elasticsearch. |