Blog Detail

Covid-19 Global Tracker
preview image DevOps
by Anurag Srivastava, Apr 14, 2018, 1:18:05 PM | 4 minutes

Introduction to Elasticsearch

Next blogs on Elasticsearch of this series:

Elasticsearch Installation and Configuration on Ubuntu 14.04
Log analysis with Elastic stack

Elasticsearch is a full-text search engine that can be used as a NoSQL database and can be used as an analytics engine. It is easy to scale, schema-less, near real-time and provides a restful interface for different operations. It is schema-less and uses an inverted index for data storage. Elasticsearch is created in Java and built on top of Lucene. We can explain Elasticsearch by following terms:

  • Full-text Search Engine
  • NoSQL Database
  • Analytics Engine
  • Easy to Scale
  • RESTFul interface
  • Schema-less
  • Inverted Index
  • Near Real-Time
  • ELK Stack

These are the characteristics of Elasticsearch and we can use them in the following ways:

  • Elasticsearch as the primary backend for your website.
  • Adding Elasticsearch to an existing system running through an existing data source.
  • Elasticsearch as the back end of a ready-made solution built around it.
  • Use Elasticsearch for monitoring and analysis of the existing application without affecting the behavior of the current application.

Elasticsearch can be used in different applications as it has different language clients through which we can integrate it in any application. Some of the clients are as follows:

  • Java
  • PHP
  • Perl
  • Python
  • .NET
  • Ruby
  • JavaScript
  • Groovy

We can have different use cases to use Elasticsearch like:

  • Online Web Store
  • Price Alerting Platform
  • Analytics / Business-intelligence
  • Central Log Management
  • Fraud Management
  • System Monitoring
  • E-commerce Search Solutions
  • Visualizing Data

There are the following components of Elasticsearch:
A cluster is a collection of one or more nodes (servers) that together holds your entire data and provides federated indexing and search capabilities across all nodes. A cluster is identified by a unique name which by default is "elasticsearch".

A node is a single server that is part of your cluster, stores your data, and participates in the cluster’s indexing and search capabilities. Just like a cluster, a node is identified by a name which by default is a random Universally Unique IDentifier (UUID) that is assigned to the node at startup. In a single cluster, you can have as many nodes as you want.

An index is a collection of documents that have somewhat similar characteristics. For example, you can have an index for customer data, another index for a product catalog, and yet another index for order data.

A type used to be a logical category/partition of your index to allow you to store different types of documents in the same index, eg one type for users, another type for blog posts. It is no longer possible to create multiple types in an index, and the whole concept of types will be removed in a later version.

A document is a basic unit of information that can be indexed. For example, you can have a document for a single customer, another document for a single product, and yet another for a single order.

An index can potentially store a large amount of data that can exceed the hardware limits of a single node. To solve this problem, Elasticsearch provides the ability to subdivide your index into multiple pieces called shards. When you create an index, you can simply define the number of shards that you want. Each shard is in itself a fully-functional and independent "index" that can be hosted on any node in the cluster.

In this blog, I have just given an introduction to Elasticsearch. In the next blog, I will cover the details like how to index and search the documents in Elasticsearch.

Other Blogs on Elastic Stack:
Introduction to Elasticsearch

Elasticsearch Installation and Configuration on Ubuntu 14.04
Log analysis with Elastic stack 
Elasticsearch Rest API
Basics of Data Search in Elasticsearch
Elasticsearch Rest API
Wildcard and Boolean Search in Elasticsearch
Configure Logstash to push MySQL data into Elasticsearch 
Metrics Aggregation in Elasticsearch
Bucket Aggregation in Elasticsearch
How to create Elasticsearch Cluster

If you found this article interesting, then you can explore  "Mastering Kibana 6.0", "Kibana 7 Quick Start Guide", "Learning Kibana 7", and "Elasticsearch 7 Quick Start Guide" books to get more insight about Kibana and how we can configure ELK to create dashboards for key performance indicators. You can get the book links on the right pane of the page.

    About Author

    Anurag Srivastava

    Author of “Mastering Kibana 6.x”, “Kibana 7 Quick Start Guide”, “Learning Kibana 7”, &“Elasticsearch 7 Quick Start Guide” books & AWS Certified Solutions Architect.

    View Profile

    Comments (2)

    • user image
      jitender yadav
      Apr 15, 2018, 11:26:01 AM

      Sir, can you please elaborate all terms like cluster, node, index, type, document, shard in different blogs ..

    • user image
      Anurag Srivastava
      Apr 15, 2018, 3:15:30 PM

      Sure I will do that wait for couple of days as I am little busy for a presentation.

    Leave a comment

    Related Blogs

    Configuring Logstash to push MySQL data into Elasticsearch

    Feb 9, 2019, 12:06:18 PM | Anurag Srivastava

    Configuring Logstash to send MongoDB data into Elasticsearch

    Mar 9, 2019, 8:20:38 AM | Anurag Srivastava

    Log analysis with Elastic stack

    Jan 31, 2018, 6:11:29 AM | Anurag Srivastava

    Configuring Django application with Elastic APM

    Jan 14, 2020, 10:22:34 AM | Anurag Srivastava

    Monitoring Application using Elastic APM

    Jan 16, 2020, 11:43:29 AM | Anurag Srivastava

    MySQL Performance Tuning

    Jan 31, 2018, 6:15:34 AM | Anurag Srivastava

    Introduction to Logstash

    Dec 20, 2019, 11:38:31 AM | Anurag Srivastava

    Introduction to Elastic APM

    Jan 7, 2020, 7:15:34 PM | Anurag Srivastava

    Why monitoring is important?

    Jan 6, 2020, 7:30:13 PM | Anurag Srivastava

    Snapshot and Restore Elasticsearch Indices

    Sep 16, 2019, 5:55:06 AM | Anurag Srivastava

    Top Blogs

    Configure SonarQube Scanner with Jenkins

    Jun 21, 2018, 4:58:11 AM | Anurag Srivastava

    Build and deploy Angular code using Python

    Jun 26, 2018, 4:50:18 PM | Anurag Srivastava

    Configure Jenkins for Automated Code Deployment

    Jun 13, 2018, 3:44:01 PM | Anurag Srivastava

    SonarQube installation on Ubuntu

    May 12, 2018, 4:47:07 PM | Anurag Srivastava

    Execute Commands on Remote Machines using sshpass

    Jul 16, 2018, 5:00:02 PM | Anurag Srivastava

    Wildcard and Boolean Search in Elasticsearch

    Aug 10, 2018, 7:14:40 PM | Anurag Srivastava

    Why SonarQube is important for IT projects ?

    Apr 24, 2018, 2:52:28 PM | Anurag Srivastava

    Elasticsearch Rest API

    Jul 31, 2018, 6:16:42 PM | Anurag Srivastava

    Analyze your project with SonarQube

    Jun 2, 2018, 10:49:54 AM | Anurag Srivastava

    Configuring Logstash to send MongoDB data into Elasticsearch

    Mar 9, 2019, 8:20:38 AM | Anurag Srivastava