{"id":3492,"date":"2019-11-20T05:51:11","date_gmt":"2019-11-20T05:51:11","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=3492"},"modified":"2023-07-20T05:26:48","modified_gmt":"2023-07-20T05:26:48","slug":"elasticsearch-interview-questions-and-answers","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/","title":{"rendered":"Elasticsearch Interview Questions and Answers with Examples"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h1>Elasticsearch Interview Questions and Answers with Examples<\/h1>\n<p>&nbsp;<br \/>\nElasticsearch Interview Questions, Are you looking for the list of top Rated Elasticsearch Interview Questions? Or the one who is casually looking for the Best Platform which is offering Best interview questions on Elastic Search? Or the one who is carrying experience seeking the List of best Elasticsearch Interview Questions and Answers with Examples for experienced then stays with us for the most asked interview questions on Elastic Search which are asked in the most common interviews.<\/p>\n<p>Are you the one who is dreaming to become the certified Pro Hadoop Developer? Then ask India\u2019s Leading Big Data Training institute how to become a pro developer. Get the Advanced Big Data Certification course under the guidance of World-class Trainers of Big Data Training institute.<br \/>\n&nbsp;<\/p>\n<h3>1. What is Elasticsearch?<\/h3>\n<p>Elasticsearch is a search engine that is based on Lucene. It offers a distributed, multitenant \u2013 capable full-text<br \/>\nsearch engine with as HTTP (HyperText Transfer Protocol) web interface and Schema-free JSON<br \/>\n(JavaScript Object Notation) documents.<br \/>\nIt is developed in Java and is an open-source released under Apache License.<\/p>\n<p>&nbsp;<\/p>\n<h3>2. List the software requirements to install Elasticsearch?<\/h3>\n<p>Since Elasticsearch is built using Java, we require any of the following software to run Elasticsearch on our device.<br \/>\nThe latest version of Java 8 series<br \/>\nJava version 1.8.0_131 is recommended.<\/p>\n<p>&nbsp;<\/p>\n<h3>3. How to start an elastic search server?<\/h3>\n<p>Run Following command on your terminal to start Elasticsearch server:<br \/>\nCD elasticsearch<br \/>\n.\/bin\/elasticsearch<br \/>\ncurl \u2018http:\/\/localhost:9200\/?pretty\u2019 command is used to check the ElasticSearch server is running or not.<\/p>\n<p>&nbsp;<\/p>\n<h3>4. What is a Cluster in Elasticsearch?<\/h3>\n<p>It is a set or a collection of one or more than one nodes or servers that hold your complete data and\u00a0offers federated indexing and search capabilities across all the nodes. It is identified by a different and<br \/>\nunique name that is \u201cElasticsearch\u201d by default.<br \/>\nThis name is considered to be important because a node can be a part of a cluster only if it is set up to join<br \/>\nthe cluster by its name.<\/p>\n<p>&nbsp;<\/p>\n<h3>5. Can you list some companies that use Elasticsearch?<\/h3>\n<p>Some of the companies that use Elasticsearch along with Logstash and Kibana are:<br \/>\nWikipedia<br \/>\nNetflix<br \/>\nAccenture<br \/>\nStack Overflow<br \/>\nFujitsu<\/p>\n<p>&nbsp;<\/p>\n<h3>6. What is an Index?<\/h3>\n<p>An index in Elasticsearch is similar to a table in relational databases. The only difference lies<br \/>\nin storing the actual values in the relational database, whereas that is optional in Elasticsearch.<br \/>\nAn index is capable of storing actual or analyzed values in an index<\/p>\n<p>&nbsp;<\/p>\n<h3>7. What is a Node?<\/h3>\n<p>Each and every instance of Elasticsearch is a node. And, a collection of multiple nodes that can work in harmony<br \/>\nform an Elasticsearch cluster.<\/p>\n<p>&nbsp;<\/p>\n<h3>8. Please Explain Mapping?<\/h3>\n<p>Mapping is a process that defines how a document is mapped to the search engine, searchable characteristics<br \/>\nare included such as which fields are tokenized as well as searchable.<br \/>\nIn Elasticsearch an index created may contain documents of all \u201cmapping types\u201d.<\/p>\n<p>&nbsp;<\/p>\n<h3>9. What is a type in Elastic search?<\/h3>\n<p>A type in Elasticsearch is a logical category of the index whose semantics are completely up to the user.<\/p>\n<p>&nbsp;<\/p>\n<h3>10. What is Document?<\/h3>\n<p>A document in Elasticsearch is similar to a row in relational databases. The only difference is that every\u00a0document in an index can have a different structure or field but having the same data type\u00a0for common fields is mandatory. Each field with different data types can occur multiple times in a document.<br \/>\nThe fields can also contain other documents.<\/p>\n<h2><a href=\"https:\/\/www.youtube.com\/watch?v=8lfBjNUq6Ow\">India&#8217;s Leading Big Data Training Institute<\/a><\/h2>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/8lfBjNUq6Ow\" width=\"850\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h3>11. What are SHARDS?<\/h3>\n<p>There are resource limitations like RAM, vCPU, etc., for scale-out, due to which applications employ multiple<br \/>\ninstances of Elasticsearch on separate machines.<br \/>\nData in an index can be partitioned into multiple portions which are managed by a separate node or instance<br \/>\nof Elasticsearch. Each such portion is called a Shard. And an Elasticsearch index\u00a0has 5 shards by default.<\/p>\n<p>&nbsp;<\/p>\n<h3>12. How to add or create an index in ElasticSearch Cluster?<\/h3>\n<p>By using the command PUT before the index name, creates the index and if you want to add another index<br \/>\nthen use the command POST before the index name.<br \/>\nEx: PUT website<br \/>\nAn index named computer is created<\/p>\n<p>&nbsp;<\/p>\n<h3>13. What is REPLICAS?<\/h3>\n<p>Each shard in elastic search has again two copies of the shard that are called the replicas.<br \/>\nThey serve the purpose of fault tolerance and high availability.<\/p>\n<p>&nbsp;<\/p>\n<h3>14. How to delete an index in Elastic search?<\/h3>\n<p>To delete an index in Elasticsearch uses the command DELETE \/index name.<br \/>\nEx: DELETE \/website<\/p>\n<p>&nbsp;<\/p>\n<h3>15. How to add a Mapping in an Index?<\/h3>\n<p>Basically, Elasticsearch will automatically create the mapping according to the data provided by the user in\u00a0the request body. Its bulk functionality can be used to add more than one JSON object in the index.<br \/>\nEx: POST website \/_bulk<\/p>\n<p>&nbsp;<\/p>\n<h3>16. How to list all indexes of a Cluster in ES.?<\/h3>\n<p>By using GET \/ _index name\/ indices we can get the list of indices present in the cluster.<\/p>\n<p>&nbsp;<\/p>\n<h3>17. How relevancy and scoring are done in Elasticsearch?<\/h3>\n<p>The Boolean model is used by Lucene to find similar documents, and a formula called practical scoring<br \/>\nthe function is used to calculate the relevance.<br \/>\nThis formula copies concepts from the inverse document\/term-document frequency and the vector space model<br \/>\nand adds modern features like a coordination factor, field length normalization as well.<br \/>\nScore (q, d) is the relevance score of document \u201cd\u201d for query \u201cq\u201d.<\/p>\n<p>&nbsp;<\/p>\n<h3>18. How can you retrieve a document by ID in ES.?<\/h3>\n<p>To retrieve a document in Elasticsearch, we use the GET verb followed by the _index, _type, _id.<br \/>\nEx: GET \/ computer \/ blog \/ 123?=pretty<\/p>\n<p>&nbsp;<\/p>\n<h3>19. List different types of queries supported by Elasticsearch?<\/h3>\n<p>The Queries are divided into two types with multiple queries categorized under them.<br \/>\nFull-text queries: Match Query, Match phrase Query, Multi match Query, Match phrase prefix Query,<br \/>\ncommon terms Query, Query string Query, simple Query String Query.<br \/>\nTerm level queries: term Query, term set Query, terms Query, Range Query, Prefix Query, wildcard Query,<br \/>\nregexp Query, fuzzy Query, exists Query, type Query, ids Query.<\/p>\n<p>&nbsp;<\/p>\n<h3>20. What are the different ways of searching in Elasticsearch?<\/h3>\n<p>We can perform the following searches in Elasticsearch:<br \/>\nMulti-index, Multitype search: All search APIs can be applied across all multiple indices with the support for the multi-index system.<br \/>\nWe can search for certain tags across all indices as well as all across all indices and all types.<br \/>\nURI search: A search request is executed purely using a URI by providing request parameters.<br \/>\nRequest body search: A search request can be executed by a search DSL, that includes the query DSL within the body.<\/p>\n<p>&nbsp;<\/p>\n<h3>21. How does aggregation work in Elasticsearch?<\/h3>\n<p>The aggregation framework provides aggregated data based on the search query. It can be seen as a unit<br \/>\nof work that builds analytic information over the set of documents.<br \/>\nThere are different types of aggregations with different purposes and outputs.<\/p>\n<p>&nbsp;<\/p>\n<h3>22. What is the difference between Term-based and Full-text queries?<\/h3>\n<p>Term-based Queries: Queries like the term query or fuzzy query are the low-level queries that do not have the analysis\u00a0phase. A term Query for the term Foo searches for the exact term in the inverted index and calculates<br \/>\nthe IDF\/TF relevance score for every document that has a term.<br \/>\nFull-text Queries: Queries like match query or query string queries are the high-level queries that understand\u00a0that mapping of a field.As soon as the query assembles the complete list of items it executes the appropriate low-level query for every term, and finally combines their results to\u00a0produce the relevance score of every document.<\/p>\n<p>&nbsp;<\/p>\n<h3>23. Can Elasticsearch replace the database?<\/h3>\n<p>Yes, Elasticsearch can be used as a replacement for a database as the Elasticsearch is very powerful.<br \/>\nIt offers features like multi-tenancy, sharding, and Replication, distribution and cloud Realtime get,<br \/>\nRefresh, commit, versioning and re-indexing and many more,<br \/>\nwhich makes it an apt replacement for a database.<\/p>\n<p>&nbsp;<\/p>\n<h3>24. Where is Elasticsearch data stored?<\/h3>\n<p>Elasticsearch is a distributed documented store with several directories. It can store and retrieve the complex\u00a0data structures that are serialized as JSON documents in real-time.<\/p>\n<p>&nbsp;<\/p>\n<h3>25. How to check the elastic search server is running?<\/h3>\n<p>Generally, Elasticsearch uses the port range of 9200-9300.<br \/>\nSo, to check if it is running on your server just type the URL of the homepage followed by the port number.<br \/>\nEx: localhost:9200<\/p>\n<p>&nbsp;<\/p>\n<h3>26. Features of ElasticSearch?<\/h3>\n<p>Built on Top of Lucene (A full-text search engine by Apache )<br \/>\nDocument-Oriented (Stores data structured JSON documents)<br \/>\nFull-Text Search (Supports Full-text search indexing which giving faster result retrieval)<br \/>\nSchema-Free (Uses NoSQL)<br \/>\nRestful API (Support Restful APIs for storage and retrieval of records)<br \/>\nSupports Autocompletion &amp; Instant Search<\/p>\n<p>&nbsp;<\/p>\n<h3>27. Does ElasticSearch have a schema?<\/h3>\n<p>Yes, ElasticSearch can have mappings that can be used to enforce a schema on documents.<\/p>\n<p>&nbsp;<\/p>\n<h3>28. What is indexing in ElasticSearch?<\/h3>\n<p>The process of storing data in an index is called indexing in ElasticSearch. Data in ElasticSearch can be dividend\u00a0into write-once and read-many segments. Whenever an update is attempted,<br \/>\na new version of the document is written to the index.<\/p>\n<p>&nbsp;<\/p>\n<h3>29. What is an Analyzer in ElasticSearch &amp; its types?<\/h3>\n<p>While indexing data in ElasticSearch, data is transformed internally by the Analyzer defined for the index, and then indexed.<br \/>\nAn analyzer is built of tokenizer and filters. The following types of Analyzers are available in ElasticSearch 1.10.<br \/>\n1. STANDARD ANALYZER<br \/>\n2. SIMPLE ANALYZER<br \/>\n3. WHITESPACE ANALYZER<br \/>\n4. STOP ANALYZER<br \/>\n5. KEYWORD ANALYZER<br \/>\n6. PATTERN ANALYZER<br \/>\n7. LANGUAGE ANALYZERS<br \/>\n8. SNOWBALL ANALYZER<br \/>\n9. CUSTOM ANALYZER<\/p>\n<p>&nbsp;<\/p>\n<h3>30. What is a Tokenizer in ElasticSearch?<\/h3>\n<p>A Tokenizer breakdown field values of a document into a stream and inverted indexes are created and updated using\u00a0these values, and these streams of values are stored in the document.<\/p>\n<p>&nbsp;<\/p>\n<h3>31. What is the query language of ElasticSearch?<\/h3>\n<p>ElasticSearch uses the Apache Lucene query language, which is called Query DSL.<\/p>\n<p>&nbsp;<\/p>\n<h3>32. What Is Inverted Index In Elasticsearch?<\/h3>\n<p><strong>Answer:<\/strong> The inverted index is the heart of search engines. The primary goal of a search engine is to provide speedy searches while\u00a0finding the documents in which our search terms occur.<br \/>\nThe inverted index is a hashmap like data structure that directs users from a word to a document or a web page.<br \/>\nIt is the heart of search engines. Its main goal is to provide quick searches for finding data from millions of documents.<\/p>\n<p>Usually, in Books, we have inverted indexes as below. Based on the word we can thus find the page on which the word exists.<\/p>\n<p>Consider the following statements<\/p>\n<p>Google is a good website.<br \/>\nGoogle is one of the good websites.<br \/>\nFor indexing purpose, the above text is tokenized into separate terms and all the unique terms are stored<br \/>\ninside the index with information such as in which document this term appears and what is the term position in that document.<\/p>\n<p>So the inverted index for the document text will be as follows-<\/p>\n<p>When you search for the term website OR websites, the query is executed against the inverted index and the terms are looked\u00a0out for, and the documents where these terms appear are quickly identified.<\/p>\n<p>&nbsp;<\/p>\n<h3>33. What Is Elasticsearch?<\/h3>\n<p>Elasticsearch is a search engine based on Lucene. It provides a distributed, multitenant-capable<br \/>\nfull-text search engine with an HTTP web interface and schema-free JSON documents.<br \/>\nElasticsearch is developed in Java and is released as open-source under the terms of the Apache License.<\/p>\n<p>&nbsp;<\/p>\n<h3>34. What Are The Basic Operations You Can Perform On A Document?<\/h3>\n<p>The following operations can be performed on documents<\/p>\n<p>INDEXING A DOCUMENT USING ELASTICSEARCH.<br \/>\nFETCHING DOCUMENTS USING ELASTICSEARCH.<br \/>\nUPDATING DOCUMENTS USING ELASTICSEARCH.<br \/>\nDELETING DOCUMENTS USING ELASTICSEARCH.<\/p>\n<p>&nbsp;<\/p>\n<h3>35. Explain Match All Query?<\/h3>\n<p>Match all query is the most basic query; it returns all the content and with a score of 1.0 for every object.<br \/>\nEx.<br \/>\nPOST http:\/\/localhost:9200\/schools*\/_search<br \/>\n{<br \/>\n&#8220;query&#8221;:{<br \/>\n&#8220;match_all&#8221; : { }<br \/>\n}<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<h3>36. Explain the Match query?<\/h3>\n<p>Match query is used to match a text or phrase with the values of one or more fields.<br \/>\nEx.<br \/>\nPOST http:\/\/localhost:9200\/schools*\/_search<br \/>\n{<br \/>\n&#8220;query&#8221;:{<br \/>\n&#8220;match&#8221; : {<br \/>\n&#8220;city&#8221;:&#8221;pune&#8221;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<h3>37. Explain Multi_match query?<\/h3>\n<p>multi match query is used to match a text or phrase with more than one field. For example,<\/p>\n<p>POST http:\/\/localhost:9200\/schools*\/_search<br \/>\n{<br \/>\n&#8220;query&#8221;:{<br \/>\n&#8220;multi_match&#8221; : {<br \/>\n&#8220;query&#8221;: &#8220;hyderabad&#8221;,<br \/>\n&#8220;fields&#8221;: [ &#8220;city&#8221;, &#8220;state&#8221; ]<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<h3>38. Explain Range Query?<\/h3>\n<p>The range query is used to search the objects with values between the ranges of values. For this,<br \/>\nwe need to use operators like<\/p>\n<p>gte \u2212 greater than equal to<br \/>\ngt \u2212 greater-than<br \/>\nlte \u2212 less-than equal to<br \/>\nlt \u2212 less-than<\/p>\n<p>For example,<br \/>\n{<br \/>\n&#8220;query&#8221;:{<br \/>\n&#8220;range&#8221;:{<br \/>\n&#8220;rating&#8221;:{<br \/>\n&#8220;gte&#8221;:3.5<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<h3>39. Explain Geo Queries?<\/h3>\n<p>These queries deal with geo locations and geo points. These queries help to find out schools or any other<br \/>\ngeographical object near to any location. You need to use geo point data type. For example,<\/p>\n<p>{<br \/>\n&#8220;query&#8221;:{<br \/>\n&#8220;filtered&#8221;:{<br \/>\n&#8220;filter&#8221;:{<br \/>\n&#8220;geo_distance&#8221;:{<br \/>\n&#8220;distance&#8221;:&#8221;100km&#8221;,<br \/>\n&#8220;location&#8221;:[32.052098, 76.649294]<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n\u200b<\/p>\n<h3>40. What are Aggregations in ElasticSearch?<\/h3>\n<p>Aggregation is a framework that collects all the data selected by the search query.<br \/>\nThis framework includes many building blocks to provide support in building complex summaries of the data.<\/p>\n<p>&nbsp;<\/p>\n<h3>41. How Max aggregation is used?<\/h3>\n<p>Max aggregation is used to get the max value of a specific numeric field in aggregated documents. Here\u2019s example,<br \/>\nPOST http:\/\/localhost:9200\/schools\/_search<br \/>\n{<br \/>\n&#8220;aggs&#8221; : {<br \/>\n&#8220;max_fees&#8221; : { &#8220;max&#8221; : { &#8220;field&#8221; : &#8220;fees&#8221; } }<br \/>\n}<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<h3>42. How Avg Aggregation is done?<\/h3>\n<p>Avg aggregation can be used to find the average of any numeric field appear in the aggregated documents. For example,<br \/>\nPOST http:\/\/localhost:9200\/schools\/_search<br \/>\n{<br \/>\n&#8220;aggs&#8221;:{<br \/>\n&#8220;avg_fees&#8221;:{&#8220;avg&#8221;:{&#8220;field&#8221;:&#8221;fees&#8221;}}<br \/>\n}<br \/>\n}<br \/>\n\u200b<\/p>\n<h3>43. Min aggregation in Elasticsearch?<\/h3>\n<p>Min aggregation is used to find the min value of a specific numeric field in aggregated documents. Here\u2019s example,<br \/>\nPOST http:\/\/localhost:9200\/schools*\/_search<br \/>\n{<br \/>\n&#8220;aggs&#8221; : {<br \/>\n&#8220;min_fees&#8221; : { &#8220;min&#8221; : { &#8220;field&#8221; : &#8220;fees&#8221; } }<br \/>\n}<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<h3>44. Sum aggregation in ElasticSearch.<\/h3>\n<p>Sum aggregation is used to calculate the sum of a specific numeric field in aggregated documents. For example,<br \/>\nPOST http:\/\/localhost:9200\/schools*\/_search<br \/>\n{<br \/>\n&#8220;aggs&#8221; : {<br \/>\n&#8220;total_fees&#8221; : { &#8220;sum&#8221; : { &#8220;field&#8221; : &#8220;fees&#8221; } }<br \/>\n}<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<h3>45. What are the advantages of ElasticSearch?<\/h3>\n<p>Elasticsearch is developed on Java, which makes it compatible on almost every platform.<br \/>\nElasticsearch is real-time, in other words after one second the added document is searchable in this engine.<br \/>\nElasticsearch is distributed, which makes it easy to scale and integrate into any big organization.<br \/>\nElasticsearch is creating full backups in an easy way with the concept of the gateway, which is present in Elasticsearch.<br \/>\nHandling multi-tenancy is very easy in Elasticsearch when compared to Apache Solr.<br \/>\nElasticsearch uses JSON objects as responses, which makes it possible to invoke the Elasticsearch server with a large number of different programming languages.<br \/>\nElasticsearch supports almost every document type except those that do not support text rendering.<br \/>\nElasticsearch \u2013 Disadvantages<br \/>\nElasticsearch does not have multi-language support in terms of handling request and response data (only possible in JSON) unlike in Apache Solr, where it is possible in CSV, XML and JSON formats.<br \/>\nElasticsearch also has a problem with Split-brain situations but in rare cases.<\/p>\n<p>&nbsp;<\/p>\n<h3>46. Compare Elasticsearch and RDBMS<\/h3>\n<p>Elasticsearch index is a collection of type as it is a database which is a collection of tables in RDBMS<br \/>\n(Relation Database Management System). Here each table is a collection of rows as every mapping is a\u00a0collection of JSON objects Elasticsearch.<\/p>\n<p>Elasticsearch |RDBMS<\/p>\n<p>Index |Database<br \/>\nShard |Shard<br \/>\nMapping |Table<br \/>\nField |Field<br \/>\nJSON Object |Tuple<\/p>\n<p>&nbsp;<\/p>\n<h3>47. Create Mapping and Add bulk data to that index.<\/h3>\n<p>To create mapping and data in Elasticsearch according to the data provided in the request body, use its bulk<br \/>\nfunctionality to add more than one JSON object in this index.<br \/>\nPOST http:\/\/localhost:9200\/schools\/_bulk<\/p>\n<p>{<br \/>\n&#8220;index&#8221;:{<br \/>\n&#8220;_index&#8221;:&#8221;schools&#8221;, &#8220;_type&#8221;:&#8221;school&#8221;, &#8220;_id&#8221;:&#8221;1&#8243;<br \/>\n}<br \/>\n}<br \/>\n{<br \/>\n&#8220;name&#8221;:&#8221;Central School&#8221;, &#8220;description&#8221;:&#8221;CBSE Affiliation&#8221;, &#8220;street&#8221;:&#8221;Nagan&#8221;,<br \/>\n&#8220;city&#8221;:&#8221;paprola&#8221;, &#8220;state&#8221;:&#8221;HP&#8221;, &#8220;zip&#8221;:&#8221;176115&#8243;, &#8220;location&#8221;:[31.8955385, 76.8380405],<br \/>\n&#8220;fees&#8221;:2000, &#8220;tags&#8221;:[&#8220;Senior Secondary&#8221;, &#8220;beautiful campus&#8221;], &#8220;rating&#8221;:&#8221;3.5&#8243;<br \/>\n}<br \/>\n{<br \/>\n&#8220;index&#8221;:{<br \/>\n&#8220;_index&#8221;:&#8221;schools&#8221;, &#8220;_type&#8221;:&#8221;school&#8221;, &#8220;_id&#8221;:&#8221;2&#8243;<br \/>\n}<br \/>\n}<br \/>\n{<br \/>\n&#8220;name&#8221;:&#8221;Saint Paul School&#8221;, &#8220;description&#8221;:&#8221;ICSE<br \/>\nAfiliation&#8221;, &#8220;street&#8221;:&#8221;Dawarka&#8221;, &#8220;city&#8221;:&#8221;Delhi&#8221;, &#8220;state&#8221;:&#8221;Delhi&#8221;, &#8220;zip&#8221;:&#8221;110075&#8243;,<br \/>\n&#8220;location&#8221;:[28.5733056, 77.0122136], &#8220;fees&#8221;:5000,<br \/>\n&#8220;tags&#8221;:[&#8220;Good Faculty&#8221;, &#8220;Great Sports&#8221;], &#8220;rating&#8221;:&#8221;4.5&#8243;<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<h3>\u200b48. What are the Elasticsearch REST API and use of it?<\/h3>\n<p>Elasticsearch provides a very comprehensive and powerful REST API that you can use to interact with your cluster. Among the few things that can be done with the API are as follows:<\/p>\n<p>Check your cluster, node, and index health, status, and statistics<br \/>\nAdminister your cluster, node, and index data and metadata<br \/>\nPerform CRUD (Create, Read, Update, and Delete) and search operations against your indexes<br \/>\nExecute advanced search operations viz. aggregations, filtering, paging, scripting, sorting, among many others.<\/p>\n<p>&nbsp;<\/p>\n<h3>49. What are the Disadvantages of Elasticsearch?<\/h3>\n<p>Elasticsearch does not support multiple languages while handling request and response data in JSON.<br \/>\nIn rare cases, it has a problem with Split-Brain situations.<\/p>\n<p>&nbsp;<\/p>\n<h3>50. Explain Joins in ElasticSearch.<\/h3>\n<p>In a distributed system like Elasticsearch, performing full SQL-style joins is very expensive. Thus, Elasticsearch provides\u00a0two forms of join which are designed to scale horizontally.<\/p>\n<p>1) nested query<br \/>\nThis query is used for the documents containing nested type fields. Using this query, you can query each object as an\u00a0independent document.<\/p>\n<p>2) has_child &amp; has_parent queries<br \/>\nThis query is used to retrieve the parent-child relationship between two document types within a single index.<br \/>\nThe has_child query returns the matching parent documents, while the has_parent query returns the matching child documents.<\/p>\n<p>The following example shows a simple join query:<\/p>\n<p>POST \/my_playlist\/_search<br \/>\n{<br \/>\n&#8220;query&#8221;:<br \/>\n{<br \/>\n&#8220;has_child&#8221; : {<br \/>\n&#8220;type&#8221; : &#8220;kpop&#8221;, &#8220;query&#8221; : {<br \/>\n&#8220;match&#8221; : {<br \/>\n&#8220;artist&#8221; : &#8220;EXO&#8221;<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Elasticsearch Interview Questions and Answers with Examples &nbsp; Elasticsearch Interview Questions, Are you looking for the list of top Rated Elasticsearch Interview Questions? Or the one who is casually looking for the Best Platform which is offering Best interview questions on Elastic Search? Or the one who is carrying experience seeking the List of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3495,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,1709],"tags":[90],"class_list":["post-3492","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interview-questions","category-interview-questions-interview-questions","tag-elasticsearch-interview-questions-and-answers"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Elasticsearch Interview Questions and Answers with Examples<\/title>\n<meta name=\"description\" content=\"Here is the list of top-rated elasticsearch interview questions and answers with examples, Learn the Advanced Tutorials from us Today itself.\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Elasticsearch Interview Questions and Answers with Examples\" \/>\n<meta property=\"og:description\" content=\"Here is the list of top-rated elasticsearch interview questions and answers with examples, Learn the Advanced Tutorials from us Today itself.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-20T05:51:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-20T05:26:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/11\/Elasticsearch-Interview-Questions-and-Answers.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/\",\"url\":\"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/\",\"name\":\"Elasticsearch Interview Questions and Answers with Examples\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/11\/Elasticsearch-Interview-Questions-and-Answers.jpg\",\"datePublished\":\"2019-11-20T05:51:11+00:00\",\"dateModified\":\"2023-07-20T05:26:48+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Here is the list of top-rated elasticsearch interview questions and answers with examples, Learn the Advanced Tutorials from us Today itself.\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#primaryimage\",\"url\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/11\/Elasticsearch-Interview-Questions-and-Answers.jpg\",\"contentUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/11\/Elasticsearch-Interview-Questions-and-Answers.jpg\",\"width\":960,\"height\":550,\"caption\":\"Elasticsearch Interview Questions and Answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Elasticsearch Interview Questions and Answers with Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Elasticsearch Interview Questions and Answers with Examples","description":"Here is the list of top-rated elasticsearch interview questions and answers with examples, Learn the Advanced Tutorials from us Today itself.","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Elasticsearch Interview Questions and Answers with Examples","og_description":"Here is the list of top-rated elasticsearch interview questions and answers with examples, Learn the Advanced Tutorials from us Today itself.","og_url":"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2019-11-20T05:51:11+00:00","article_modified_time":"2023-07-20T05:26:48+00:00","og_image":[{"width":960,"height":550,"url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/11\/Elasticsearch-Interview-Questions-and-Answers.jpg","type":"image\/jpeg"}],"author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/","url":"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/","name":"Elasticsearch Interview Questions and Answers with Examples","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#primaryimage"},"image":{"@id":"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#primaryimage"},"thumbnailUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/11\/Elasticsearch-Interview-Questions-and-Answers.jpg","datePublished":"2019-11-20T05:51:11+00:00","dateModified":"2023-07-20T05:26:48+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Here is the list of top-rated elasticsearch interview questions and answers with examples, Learn the Advanced Tutorials from us Today itself.","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#primaryimage","url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/11\/Elasticsearch-Interview-Questions-and-Answers.jpg","contentUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/11\/Elasticsearch-Interview-Questions-and-Answers.jpg","width":960,"height":550,"caption":"Elasticsearch Interview Questions and Answers"},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/interview-questions\/elasticsearch-interview-questions-and-answers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Elasticsearch Interview Questions and Answers with Examples"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/3492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=3492"}],"version-history":[{"count":5,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/3492\/revisions"}],"predecessor-version":[{"id":4111,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/3492\/revisions\/4111"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media\/3495"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=3492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=3492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=3492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}