Basics of ElasticSearch And Its Components

ERP Solutions oodles
3 min readApr 22, 2024

Elastic search is a distributed, open-source analytics and search engine. It is based on Apache Lucene and is created in Java. Large volumes of data can be stored, searched for, and analysed more quickly — in milliseconds, even. It looks for its index instead of the data directly, which allows it to get such a quick response. Instead of using database schemas, it employs a structure based on documents. You can see Elastic Search as a server that accepts a JSON request and returns a JSON response.

How Does Elasticsearch Work?

Let’s now understand how elastic search organizes data.

Documents

The informational unit that can be represented as JSON data is the document. It simply reminds you of a row in a database that is connected to an entity. Here, a document can be encoded JSON data in addition to text. This data may be text, date, numbers, or strings. Every document has an identity that is distinct from others and a data type that indicates the type of entity it is.

Indices

An index is a grouping of several documents with similar qualities. In Elasticsearch, this entity is the target of queries. In a database schema, an index resembles a database almost exactly. An e-commerce website, for instance, might have an index for orders, products, sellers, and buyers. An index can be recognised by its name, which is used to refer to it when carrying out various actions such as updating, deleting, searching, and indexing.

Inverted Index

In elasticsearch, an inverted index is essentially an index. It is a structure that keeps track of a mapping between words and numbers and their respective locations within a text or even a list of documents. It basically guides us from a word to a document using a key-value pair structure akin to a map. Instead of holding the string directly, it divides each document into specific search words and then connects that term to the papers in which those search terms appear.

Cluster

A group of multiple nodes connected together in an elasticsearch forms a cluster. This cluster is very beneficial in distributing the task, performing operations like searching , indexing across all over the nodes of the cluster.

Node

It functions as a single server as part of a cluster. In addition to participating in indexing and searching, it saves data. One of the three methods listed below can be used to configure a node in elastic search.

Master Node — The master node, also known as the main node, is in charge of managing the Elasticsearch cluster and is exclusively in charge of all cluster-wide actions, such as adding and removing nodes and deleting indexes.

Data Node — Data nodes are used to store data and carry out data-related tasks like searching.

Client Node — It forwards cluster queries to the master node, also known as the main node, and data-related requests to the subsequent data nodes.

Shards

Elasticsearch has the option to further split the index into several parts, which are referred to as shards. A shard can function as a node in a cluster and is represented as a standalone index on its own. Through this method, elasticsearch boosts query capacity while offering redundancy against any loss, such as hardware failure.

Replicas

A replica is just a copy of anything, and elasticsearch can offer a replica shard that is an exact duplicate of the original shard. In elasticsearch, each index is a part of an original shard. Replicas strengthen the operational capacity of Elasticsearch and protect us against any kind of failure, such as a hardware malfunction that can cause data loss.

We are an ERP development business that specialises in creating unique enterprise solutions to meet our clients’ demands in a variety of industries. Our team possesses extensive knowledge in creating unique ERP solutions from scratch utilising open-source software platforms such as Odoo, OFBiz, ERPNext, and Opentaps. Please email us at erp@oodles.io to find out more about our custom ERP software development services.

--

--

ERP Solutions oodles

We are a leading ERP development company in India offers a wide range of ERP software development services to help you grow your business exponentially.