{"id":26008,"date":"2021-12-18T10:59:20","date_gmt":"2021-12-18T10:59:20","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=26008"},"modified":"2025-05-04T06:12:22","modified_gmt":"2025-05-04T06:12:22","slug":"master-in-elastic-search-related-faqs","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/master-in-elastic-search-related-faqs\/","title":{"rendered":"Top Elastic search interview questions and answers"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is the main use of Elasticsearch?<\/h2>\n\n\n\n<p>Elasticsearch is used for a lot of different use cases: &#8220;<strong>classical&#8221; full-text<\/strong> search, analytics store, auto-completer, spell checker, alerting engine, and as a general-purpose document store.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why is Elasticsearch so fast?<\/h2>\n\n\n\n<p>Elasticsearch is fast.<br><br>Because&nbsp;<strong>Elasticsearch is built on top of Lucene, it excels at full-text search<\/strong>. Elasticsearch is also a near real-time search platform, meaning the latency from the time a document is indexed until it becomes searchable is very short \u2014 typically one second.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is an Elasticsearch shard?<\/h2>\n\n\n\n<p>The shard is&nbsp;<strong>the unit at which Elasticsearch distributes data around the cluster<\/strong>. The speed at which Elasticsearch can move shards around when rebalancing data, e.g. following a failure, will depend on the size and number of shards as well as network and disk performance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When should Elasticsearch be used?<\/h2>\n\n\n\n<p>You want Elasticsearch\u00a0<strong>when you&#8217;re doing a lot of text search<\/strong>, where traditional RDBMS databases are not performing really well (poor configuration, acts as a black-box, poor performance). Elasticsearch is highly customizable, extendable through plugins. You can build robust searches without much knowledge quite fast.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is an index in Elasticsearch?<\/h2>\n\n\n\n<p>An index can be thought of as\u00a0<strong>an optimized collection of documents<\/strong>\u00a0and each document is a collection of fields, which are the key-value pairs that contain your data. By default, Elastic search indexes all data in every field, and each indexed field has a dedicated, optimized data structure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the Elasticsearch cluster?<\/h2>\n\n\n\n<p>An Elasticsearch cluster is\u00a0<strong>a group of nodes that have the same cluster. <\/strong>name attribute. As nodes join or leave a cluster, the cluster automatically reorganizes itself to evenly distribute the data across the available nodes. If you are running a single instance of Elasticsearch, you have a cluster of one node.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Elasticsearch architecture?<\/h2>\n\n\n\n<p>The Elasticsearch architecture is&nbsp;<strong>designed to support the retrieval of documents<\/strong>, which are stored as JSON objects. Elasticsearch supports nested structures, which helps handle complex data and queries. To track information, Elasticsearch uses keys prepended with an underscore, which represents metadata.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where is the data stored in Elasticsearch?<\/h2>\n\n\n\n<p>By default, Elasticsearch indexes all data&nbsp;<strong>in every field<\/strong>&nbsp;and each indexed field has a dedicated, optimized data structure. For example, text fields are stored in inverted indices, and numeric and geo fields are stored in BKD trees.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is special about Elasticsearch?<\/h2>\n\n\n\n<p>Speed. Speaking of performance, ElasticSearch is&nbsp;<strong>able to execute complex queries extremely fast<\/strong>. It also caches almost all of the structured queries commonly used as a filter for the result set and executes them only once. For every other request containing a cached filter, it checks the result from the cache.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is the main use of Elasticsearch? Elasticsearch is used for a lot of different use cases: &#8220;classical&#8221; full-text search, analytics store, auto-completer, spell checker, alerting engine, and as a&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5936],"tags":[4666],"class_list":["post-26008","post","type-post","status-publish","format-standard","hentry","category-elastic","tag-elasticsearch"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/26008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=26008"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/26008\/revisions"}],"predecessor-version":[{"id":26153,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/26008\/revisions\/26153"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=26008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=26008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=26008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}