Skip to main content

Short note: Elastic Search

Short answer

Elasticsearch is a distributed, RESTful search engine on Apache Lucene that stores JSON documents in sharded and replicated indices. It provides full-text search, real-time analytics, aggregations, and near real-time indexing, often used in the ELK stack for search and log analysis.

Write a short note on Elastic Search.

Elasticsearch is an open-source, distributed, RESTful search and analytics engine built on top of Apache Lucene. It stores data as JSON documents and makes them searchable in near real time. It is the core of the ELK stack (Elasticsearch, Logstash, Kibana).

Key concepts

ElasticsearchRelational analogy
IndexDatabase
Document (JSON)Row
FieldColumn
ShardPartition of an index
  • Cluster and node: a cluster is a group of nodes that together hold the data; a node can have the master, data or client (coordinating) role.
  • Index: a collection of similar documents.
  • Shards and replicas: an index is split into primary shards spread over the nodes for scaling; each shard can have replica copies for fault tolerance and faster reads.

Features

  • Full-text search with relevance ranking, fuzzy matching and auto-complete
  • Distributed, horizontally scalable and highly available
  • Schema-free JSON documents, with dynamic mapping
  • REST API over HTTP: GET /books/_search?q=hadoop
  • Powerful aggregations for analytics
  • Near real-time indexing and search

Example:

PUT /books/_doc/1
{ "title": "Hadoop Guide", "author": "Tom White" }

GET /books/_search
{ "query": { "match": { "title": "hadoop" } } }

Uses

Website and e-commerce search, log and event analysis (with Logstash and Kibana), monitoring, and security analytics. Large organisations such as Wikipedia, GitHub and Netflix use it for search.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Big Data Technologies chapter 5 questions →