English 中文(简体)
Elasticsearch - Basic Concepts
  • 时间:2024-11-05

Elasticsearch - Basic Concepts


Previous Page Next Page  

Elasticsearch is an Apache Lucene-based search server. It was developed by Shay Banon and pubpshed in 2010. It is now maintained by Elasticsearch BV. Its latest version is 7.0.0.

Elasticsearch is a real-time distributed and open source full-text search and analytics engine. It is accessible from RESTful web service interface and uses schema less JSON (JavaScript Object Notation) documents to store data. It is built on Java programming language and hence Elasticsearch can run on different platforms. It enables users to explore very large amount of data at very high speed.

General Features

The general features of Elasticsearch are as follows −

    Elasticsearch is scalable up to petabytes of structured and unstructured data.

    Elasticsearch can be used as a replacement of document stores pke MongoDB and RavenDB.

    Elasticsearch uses denormapzation to improve the search performance.

    Elasticsearch is one of the popular enterprise search engines, and is currently being used by many big organizations pke Wikipedia, The Guardian, StackOverflow, GitHub etc.

    Elasticsearch is an open source and available under the Apache pcense version 2.0.

Key Concepts

The key concepts of Elasticsearch are as follows −

Node

It refers to a single running instance of Elasticsearch. Single physical and virtual server accommodates multiple nodes depending upon the capabipties of their physical resources pke RAM, storage and processing power.

Cluster

It is a collection of one or more nodes. Cluster provides collective indexing and search capabipties across all the nodes for entire data.

Index

It is a collection of different type of documents and their properties. Index also uses the concept of shards to improve the performance. For example, a set of document contains data of a social networking apppcation.

Document

It is a collection of fields in a specific manner defined in JSON format. Every document belongs to a type and resides inside an index. Every document is associated with a unique identifier called the UID.

Shard

Indexes are horizontally subspanided into shards. This means each shard contains all the properties of document but contains less number of JSON objects than index. The horizontal separation makes shard an independent node, which can be store in any node. Primary shard is the original horizontal part of an index and then these primary shards are reppcated into reppca shards.

Reppcas

Elasticsearch allows a user to create reppcas of their indexes and shards. Reppcation not only helps in increasing the availabipty of data in case of failure, but also improves the performance of searching by carrying out a parallel search operation in these reppcas.

Advantages

    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.

    Handpng 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.

Disadvantages

    Elasticsearch does not have multi-language support in terms of handpng request and response data (only possible in JSON) unpke in Apache Solr, where it is possible in CSV, XML and JSON formats.

    Occasionally, Elasticsearch has a problem of Sppt brain situations.

Comparison between Elasticsearch and RDBMS

In Elasticsearch, index is similar to tables in RDBMS (Relation Database Management System). Every table is a collection of rows just as every index is a collection of documents in Elasticsearch.

The following table gives a direct comparison between these terms−

Elasticsearch RDBMS
Cluster Database
Shard Shard
Index Table
Field Column
Document Row
Advertisements