English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

简介 Elasticsearch

Elasticsearch è un server di ricerca basato su Apache Lucene. È stato sviluppato da Shay Banon e pubblicato nel 2010. Ora è mantenuto da Elasticsearch BV. La versione più recente è 7.0.0.

Elasticsearch è un motore di ricerca e analisi di testo distribuito in tempo reale e open source. È accessibile tramite un'interfaccia di servizio web RESTful e utilizza documenti JSON (JavaScript Object Notation) senza schema per memorizzare dati. È costruito in Java, quindi Elasticsearch può eseguire su diverse piattaforme. Permette agli utenti di navigare rapidamente attraverso grandi quantità di dati.

Caratteristiche

Le caratteristiche comuni di Elasticsearch sono le seguenti -

  • Elasticsearch può espandersi fino a PB di dati strutturati e non strutturati.

  • Elasticsearch può sostituire MongoDB e RavenDB tra altri repository di documenti.

  • Elasticsearch utilizza la denormalizzazione per migliorare le prestazioni di ricerca.

  • Elasticsearch è uno dei motori di ricerca aziendali più popolari, utilizzato da molte grandi organizzazioni come Wikipedia, The Guardian, StackOverflow, GitHub e altri.

  • Elasticsearch is an open-source project that can be used under the Apache License version 2.0.

Key Concepts

The key concepts of Elasticsearch are as follows-

Nodes

It refers to a single running instance of Elasticsearch. A single physical and virtual server can accommodate multiple nodes, depending on their physical resource capabilities (such as RAM, storage, and processing power).

CLUSTER

It is a collection of one or more nodes. The cluster provides collective indexing and search functionality across all nodes for all data.

INDICE

It is a collection of documents of different types and their properties. The index also uses the concept of shards to improve performance. For example, a set of documents may contain data from a social networking application.

DOCUMENTO

It is a collection of fields defined in a specific way in JSON format. Each document belongs to a type and is located within an index. Each document is associated with a unique identifier called UID.

FRAGMENTO

Indexes are subdivided horizontally into shards. This means that each shard contains all the properties of the documents, but the number of JSON objects contained is less than that of the index. Horizontal partitioning makes the shard an independent node that can be stored on any node. The primary shard is the original horizontal part of the index, and then these primary shards are copied to replica shards.

Replicas

Elasticsearch allows users to create index and shard replicas. Replication not only helps improve data availability in the event of a failure but also improves search performance by executing parallel search operations on these replicas.

Advantages

  • Elasticsearch is developed in Java, which makes it compatible with almost all platforms.

  • Elasticsearch is real-time, in other words, documents added one second ago can be searched in this engine.

  • Elasticsearch is distributed, which allows for easy expansion and integration in any large organization.

  • Creating a complete backup using the gateway concept is very simple, a concept that is very common in Elasticsearch.

  • Compared to Apache Solr, handling multi-tenancy in Elasticsearch is very easy.

  • Elasticsearch uses JSON objects as responses, which allows for the use of a large number of different programming languages to call the Elasticsearch server.

  • Elasticsearch supports almost all document types, except for those that do not support text rendering.

Disadvantages

  • In terms of handling request and response data, Elasticsearch does not provide multilingual support (available only in JSON), unlike Apache Solr, which can handle CSV, XML, and JSON formats.

  • A volte, Elasticsearch può avere problemi di brain split.

CONFRONTO TRA Elasticsearch E RDBMS

In Elasticsearch, l'indice è simile a una tabella in RDBMS (sistema di gestione della base di dati relazionale). Ogni tabella è un insieme di righe, proprio come ogni indice è un insieme di documenti in Elasticsearch.

La tabella sottostante confronta direttamente questi termini-

ElasticsearchSISTEMA DI GESTIONE DELLA BASE DI DATI RELAZIONALE (RDBMS)
CLUSTERDATABASE
FRAGMENTOFRAGMENTO
INDICETABELE
CAMPOCOLONNA
DOCUMENTORIGA