• LOGIN
  • No products in the cart.

ElasticSearch Interview Questions and Answers

What is ElasticSearch ?

Elasticsearch is a search engine based on Lucene. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents. Elasticsearch is developed in Java and is released as open source under the terms of the Apache License.

What are the basic operations you can perform on a document ?

The following operations can be performed on documents

  1. INDEXING A DOCUMENT USING ELASTICSEARCH.
  2. FETCHING DOCUMENTS USING ELASTICSEARCH.
  3. UPDATING DOCUMENTS USING ELASTICSEARCH.
  4. DELETING DOCUMENTS USING ELASTICSEARCH.
Are you Looking for Elastic Search Training? Please Enroll for Demo Elastic Search..!

What is inverted index in Elastic search ?

Inverted index is the heart of search engines. The primary goal of a search engine is to provide speedy searches while finding the documents in which our search terms occur. Inverted index is a hash map like data structure that directs users from a word to a document or a web page. It is the heart of search engines. Its main goal is to provide quick searches for finding data from millions of documents.

Usually in Books we have inverted indexes as below. Based on the word we can thus find the page on which the word exists.

Does ElasticSearch have a schema ?

Yes, ElasticSeach can have mappings which can be used to enforce schema on documents.

What is a document type in ElasticSearch ?

A document type can be seen as the document schema / mapping definition, which has the mapping of all the fields in the document along with its data types.

What is indexing in ElasticSearch ?

The process of storing data in an index is called indexing in ElasticSearch. Data in ElasticSearch can be dividend into write-once and read-many segments. Whenever an update is attempted, a new version of the document is written to the index.

What is a replica in ElasticSearch?

An index is broken into shards in order to distribute them and scale. Replicas are copies of the shards. A node is a running instance of elastic search which belongs to a cluster. A cluster consists of one or more nodes which share the same cluster name.

What is the is use of attributes- enabled, index and store?

The enabled attribute applies to various ElasticSearch specific/created fields such as _index and _size. User-supplied fields do not have an “enabled” attribute.

Store means the data is stored by Lucene will return this data if asked. Stored fields are not necessarily searchable. By default, fields are not stored, but full source is. Since you want the defaults (which makes sense), simply do not set the store attribute.

The index attribute is used for searching. Only indexed fields can be searched. The reason for the differentiation is that indexed fields are transformed during analysis, so you cannot retrieve the original data if it is required.

What is the query language of ElasticSearch?

Elastic Search uses the Apache Lucene query language, which is called Query DSL.

What is an Analyzer in Elastic Search ?

While indexing data in Elastic Search, data is transformed internally by the Analyzer defined for the index, and then indexed. An analyzer is built of tokenizer and filters. Following types of Analyzers are available in ElasticSearch 1.10.

STANDARD ANALYZER

SIMPLE ANALYZER

WHITESPACE ANALYZER

STOP ANALYZER

KEYWORD ANALYZER

PATTERN ANALYZER

LANGUAGE ANALYZERS

SNOWBALL ANALYZER

CUSTOM ANALYZER

Are you Looking for Elastic Search Online Training? Please Enroll for Demo Elastic Search..!

What are the advantages of Elasticsearch..?

Elasticsearch is developed on Java, which makes it compatible on almost every platform.

  • Elasticsearch is real time, in other words after one second the added document is searchable in this engine.
  • Elasticsearch is distributed, which makes it easy to scale and integrate in any big organization.
  • Creating full backups are easy by using the concept of gateway, which is present in Elasticsearch.
  • Handling multi-tenancy is very easy in Elasticsearch when compared to Apache Solr.
  • Elasticsearch uses JSON objects as responses, which makes it possible to invoke the Elasticsearch server with a large number of different programming languages.
  • Elasticsearch supports almost every document type except those that do not support text rendering

What are the Disadvantages of Elasticsearch??

  • Elasticsearch 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.
  • Elasticsearch also have a problem of Split brain situations, but in rare cases.
November 1, 2019
GoLogica Technologies Private Limited  © 2019. All rights reserved.