Free ElasticSearch Trivia Questions And Answers — Questions and Answers
Question 1: Every section is a .
- inverted index (Correct answer)
- meta index
- indexed inversion
- bloom index
Correct answer: inverted index
At its core, Elasticsearch relies on the concept of an inverted index for efficient full-text search. An inverted index maps terms to the documents in which they appear, rather than mapping documents to their terms. This structure allows for very fast lookup of documents containing specific words or phrases, making search operations highly performant.
Question 2: In the absence of a given ID, an ID will be produced automatically for the document.
- Yes (Correct answer)
- No
Correct answer: Yes
When indexing a document into Elasticsearch, if you do not explicitly provide an `_id` for the document, Elasticsearch will automatically generate a unique ID. This auto-generated ID is a 20-character URL-safe string, ensuring that every document has a distinct identifier within its index. This feature simplifies document creation when unique identifiers are not readily available from the source data.
Question 3: An Index may be divided into several
- Shards (Correct answer)
- Crystals
- Exerts
- Scalding
Correct answer: Shards
An Elasticsearch index is a logical namespace that can be divided into multiple physical units called shards. Each shard is a self-contained Lucene index, capable of being hosted on any node in the cluster. Sharding allows an index to scale horizontally, distributing data and operations across multiple nodes, which improves performance and fault tolerance.
Question 4: Documents cannot be changed.
- Yes (Correct answer)
- No
Correct answer: Yes
In Elasticsearch, documents are immutable. When you 'update' a document, Elasticsearch doesn't modify it in place. Instead, it marks the old document as deleted and then indexes a completely new version of the document with the updated content. This immutability simplifies concurrency control and ensures data integrity, although it means updates are effectively re-indexing operations.
Question 5: A shard may be a real or a replica.
- Analysis
- Segments
- Secondary
- Primary (Correct answer)
Correct answer: Primary
In Elasticsearch, an index is composed of primary shards and replica shards. A primary shard is the original, authoritative copy of a portion of the index's data. Replica shards are exact copies of primary shards, providing redundancy for fault tolerance and increasing search throughput by distributing read requests.
Question 6: The replica shard is a copy of the original shard.
- Primary (Correct answer)
- Analysis
- Secondary
- Segments
Correct answer: Primary
A replica shard in Elasticsearch is an exact copy of a primary shard. Its purpose is to provide high availability and fault tolerance, as well as to scale out search throughput. If a primary shard fails, a replica can be promoted to become the new primary, ensuring continuous data availability.
Question 7: A _____ index describes each shard.
- Oozie
- Nosql
- Mapreduce
- Lucene (Correct answer)
Correct answer: Lucene
Elasticsearch leverages Lucene as its core search library. Each shard within an Elasticsearch cluster is essentially a self-contained and fully functional Lucene index. This architecture allows Elasticsearch to distribute data and search operations across multiple nodes, ensuring scalability and high performance by parallelizing tasks across these independent Lucene instances.
Every section is a .