Top ElasticsSearch Interview Questions (2023) | CodeUsingJava
















Most frequently asked ElasticsSearch Interview Questions


  1. Difference between Lucene and Elasticsearch?
  2. What is Frozen Indices?
  3. How to shut down an elasticsearch node?
  4. How to set up ES cluster?
  5. What is Type Mapping in Index of ElasticSearch?
  6. What is replica in elasticsearch?
  7. Difference between Solr and ElasticSearch?
  8. What is IngestNode in ElasticSearch?
  9. What is Type Mapping in Index of ElasticSearch?
  10. What are the types of Query DSL?
  11. Why is sharding important in ElasticSearch?
  12. Name the basic operations you can perform on a document?
  13. Where does Elasticsearch store its data?


Difference between Lucene and Elasticsearch?

Elasticsearch
Elasticsearch is a distributing system for data replication, it can make multiple copies of data in our clusters, that enables high availibility.
Elasticsearch is provided with features like thread-pool, queues, cluster monitoring API,etc.
Elasticsearch is a search engine as it helps us for log aggregation and product search.
Lucene
Lucene provides Java-based indexing and search technology as well as spellchecking, hit highlighting and advanced analysis tokenization capabilities.
Lucene is a search engine library wher we can build our own dearch engine.
Lucene is a Java library.


What is Frozen Indices?

Frozen indices helps us to use search throttling and a memory efficient shard implementation.Indices are rarely accessed.
Functions of Indices:
  • Elasticsearch 6.6 introduced a new API called freeze API which allows us to freeze the indices that are not in use.
  • Frozen indices helps us to search data anytime as they are always open for searching means.
  • We have to unfreeze the Frozen indices to write.

How to shut down an elasticsearch node?

An Elasticsearch node run indefinitely but we need to shut it down for maintenance. A smooth shut down of Elasticsearch, releases system resources by making them available for other programs.
Process for shutting down an node:
You can stop the service by pressing CTRL + C, if the node is running in our terminal
You can also decommission a node by removing it from allocation and shutting it down with a cURL request.

How to set up ES cluster?


ES cluster


What is replica in elasticsearch?

Replicas are copies of the shards.The purpose of replica is to ensure high availability and improve search query performance and fault tolerant. This is accomplished by never storing a replica shard on the same node as its primary shard.

Difference between Solr and ElasticSearch?

Solr helps us for creating standard search applications with no massive indexing and no real time updates required.
Elasticsearch helps us with the architecture aimed at building modern real-time search applications.


What is IngestNode in ElasticSearch?

Elasticsearch ingestnode is used to process documents prior to indexing.The ingest node intercepts bulk and index requests and applies transformations to pass the documents back to the index or bulk APIs.
Two steps involved in working of ingest node:
Creating a pipeline
Creating a doc

What is Type Mapping in Index of ElasticSearch?

Type in Elasticsearch represents a class of similar documents that contains a name such as item. A mapping type represents the type of document or the entity being indexed.

Type Mapping


What are the types of Query DSL?

  • Leaf Query Clauses helps for looking a specific value in a specific field.
  • Compound Query Clauses is the combination of leaf query clauses for extracting the desiring information.

Why is sharding important in ElasticSearch?

Sharding helps us to scale our content volume.It also allows us to parallelize operations across shards by increasing performance.

Name the basic operations you can perform on a document?

INDEXING
FETCHING
UPDATING
DELETING

Where does Elasticsearch store its data?

ElasticSearch stores all the data in a folder called "data" in the elastic root directory.