ElasticSearch ElasticSearch Core Concepts & Architecture 1 — Questions and Answers
Question 1: What is the basic unit of storage in Elasticsearch?
- Index
- Document (Correct answer)
- Shard
- Node
Correct answer: Document
A document is the basic unit of information stored in Elasticsearch, represented as a JSON object.
Question 2: What does an Elasticsearch cluster consist of?
- Only one master node
- One or more nodes that share data and workload (Correct answer)
- Only data nodes
- A single index with multiple shards
Correct answer: One or more nodes that share data and workload
An Elasticsearch cluster consists of one or more nodes that together hold all the data and provide federated indexing and search capabilities.
Question 3: What is a shard in Elasticsearch?
- A type of query
- A backup copy of an index
- A single Lucene instance that holds a subset of index data (Correct answer)
- A node configuration file
Correct answer: A single Lucene instance that holds a subset of index data
A shard is a single Lucene instance that holds a portion of an index's data, enabling horizontal scaling.
Question 4: What role does the master node play in an Elasticsearch cluster?
- Handles all search queries
- Manages cluster-wide settings and metadata (Correct answer)
- Stores all primary shards
- Provides the REST API endpoint
Correct answer: Manages cluster-wide settings and metadata
The master node is responsible for cluster-wide operations such as creating/deleting indices and tracking which nodes are part of the cluster.
Question 5: What is a replica shard in Elasticsearch?
- A secondary copy of a primary shard for redundancy and read scaling (Correct answer)
- A shard on the master node
- A temporary shard used during reindexing
- A shard used only for aggregations
Correct answer: A secondary copy of a primary shard for redundancy and read scaling
A replica shard is a copy of a primary shard that provides fault tolerance and can serve read requests to improve throughput.
Question 6: Which API is used to check the health of an Elasticsearch cluster?
- GET /_nodes
- GET /_cluster/health (Correct answer)
- GET /_status
- GET /_stats
Correct answer: GET /_cluster/health
The GET /_cluster/health API returns a summary of the cluster's health status, including green, yellow, or red states.
What is the basic unit of storage in Elasticsearch?