Table of Contents
In this article, I will take you through Popular 30 Elasticsearch Interview questions and answers for beginners/Freshers. Elasticsearch is now frequently used by Organizations for searching, analyzing and managing large volumes of data. Hence it is absolutely necessary for anyone trying to build his career in this tool to know about frequently asked Elasticsearch Interview Questions and Answers. In this session, I will try to show you the most basic Elasticsearch Interview Questions and Answers asked from the Freshers/Beginners in 2020.
Elasticsearch Interview Questions and Answers
Also Read: 31 Best Chef Interview Questions and Answers
1. Which Engine is used in Elasticsearch ?
Ans. Lucene Engine.
2. Is Elasticsearch document based or Schema/Table based ?
Ans. Document Based
3. What is the meaning of Near Real Time in Elasticsearch ?
Ans. It means as soon as the data is imported in the Elasticsearch, it will becomes searchable in almost no time. This
features makes it almost a Real Time Platform.
4. What is Index ?
Ans. It is a collection of multiple categories of Documents which share a similar characteristics.
5. On what basis an Index operations like search,delete and update will be performed against its documents ?
Ans. Index Operations will be performed based on Index Name.
6. What is Cluster ?
Ans. It is collection of nodes available in the distributed environment across which the data is saved.
7. When Elasticsearch create shards ?
Ans. When index size becomes big enough, then elasticsearch divide index into multiple shards. Each shards will then
behave as independent fully functional Index.
8. What is the query to check Elasticsearch Cluster status ?
Ans. curl http://localhost:9200/_cluster/health?pretty
9. What is the query to check Elasticsearch Indices ?
Ans. curl http://localhost:9200/_cat/indices?pretty
10. What is the name of Elasticsearch configuration file ?
Ans. elasticsearch.yml
11. What are different types of API in Elasticsearch ?
Ans.Few of the APIs are :-
- Document API
- Index API
- Search API
- Cluster API
- Aggregation API
12. What are different types of Document API ?
Ans. Two types of API are there:-
- Single Document API
- Multi Document API
13. What are different Single Document API ?
Ans. Different single document APIs are:-
- Index API
- Get API
- Update API
- Delete API
14. What are different Multiple document API ?
Ans. Few of the APIs are:-
- Multi GET API
- Bulk API
- Delete by Query API
- Update by Query API
- Reindex API
15. How to check all unassigned shards ?
Ans. curl -XGET http://<elastichost>:9200/_cat/shards | grep UNASSIGNED | awk {‘print $1’}
16. How to delete all unassigned shards ?
Ans. curl -XGET http://<elastichost>:9200/_cat/shards | grep UNASSIGNED | awk {‘print $1’} | xargs -i curl -XDELETE “http://<elastichost>:9200/{}”
17. Which is the latest version of Elasticsearch currently available ?
Ans. Elasticsearch 7.6.2
18. What are different types of Tokenizers supported in Elasticsearch ?
Ans. Three types of Tokenizers are supported:-
- Word-Oriented Tokenizer
- Partial Word Tokenizer
- Structured Text Tokenizer
19. What is the query to check document exists or not ?
Ans. curl -i -XHEAD http://localhost:9200/<document_name>
20. Which Scripting Language get used in Elasticsearch to write custom scripts ?
Ans. Groovy Scripting Language
21. What will you do when a conflict occurs during document partial update ?
Ans. You need to reattempt the update
22. Which parameter usually allows us to use Optimistic Concurrency Control while updating the document ?
Ans. Version parameter
23. Which API you will use to retrieve multiple documents from Elasticsearch ?
Ans. Multi-get or mget api
24. Which formula elasticsearch uses to determine which shard a document belongs to ?
Ans. shard = hash(routing) % number_of_primary_shards
25. How to return all documents that contains some word “xyz” ?
Ans. GET /_search?q=xyz
26. How to request 7 results per page from pages 1 to 3 ?
Ans. Below is the query:-
GET /_search?size=7
GET /_search?size=7&from=14
GET /_search?size=7&from=14
27. Which parameter you should add into the query when response time is more important than the results ?
Ans. timeout parameter
28. What is Inverted Index ?
Ans. It is a structure in Elasticsearch which allows us to do very fast full-text searches.
29. What are different types of data in Elasticsearch ?
Ans. It can be broadly divided into two types:-
- Exact Values
- Full Text
30. What is Search Lite ?
Ans. It is a query string search tool useful for Adhoc queries through command line.
Popular Recommendations:-
50 Best Oracle Interview Questions and Answers
50 Best Docker Interview Questions and Answers
100 Best Networking Interview Questions Part – 1
Top 15 AWS Interview Questions and Answers