0% found this document useful (0 votes)
51 views19 pages

Elastic Search

Elasticsearch is a distributed, open source search and analytics engine that allows for exploration of large volumes of data at high speed. It uses JSON documents and is built on Java, allowing it to run on different platforms. Elasticsearch consists of nodes that form clusters, which provide indexing and search capabilities across documents organized into indexes and types. Indexes can be divided into shards and replicas to improve performance.

Uploaded by

Nicu Ciobanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views19 pages

Elastic Search

Elasticsearch is a distributed, open source search and analytics engine that allows for exploration of large volumes of data at high speed. It uses JSON documents and is built on Java, allowing it to run on different platforms. Elasticsearch consists of nodes that form clusters, which provide indexing and search capabilities across documents organized into indexes and types. Indexes can be divided into shards and replicas to improve performance.

Uploaded by

Nicu Ciobanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Elasticsearch

Basic Concepts

Presented by: Nicu Ciobanu


Content:
 General Features
 Key Concepts
 Advantages
 Disadvantages
 Populate
 Index API
 Search API
 Aggregations
 Query DSL
 Mapping
General Futures
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 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.
Node

It refers to a single running instance of Elasticsearch. Single


physical and virtual server accommodates multiple nodes depending
upon the capabilities of their physical resources like RAM, storage and
processing power.
Cluster

It is a collection of one or more nodes. Cluster provides collective


indexing and search capabilities 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
application.
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 subdivided 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
replicated into replica shards.
Replicas

Elasticsearch allows a user to create replicas of their indexes and


shards. Replication not only helps in increasing the availability of data
in case of failure, but also improves the performance of searching by
carrying out a parallel search operation in these replicas.
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 uses JSON objects as responses, which makes it possible


to invoke the Elasticsearch server with a large number of different
programming languages.
Disadvantages
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 – Populate
In this chapter, let us learn how to add some index, mapping and data to
Elasticsearch.
Elasticsearch – Index API
This API helps you to create an index. An index can be created automatically
when a user is passing JSON objects to any index or it can be created before that.
To create an index, you just need to send a PUT request with settings, mappings and
aliases or just a simple request without body.
Elasticsearch – Search API
This API is used to search content in Elasticsearch. A user can search by sending
a get request with query string as a parameter or they can post a query in the
message body of post request.
Aggregations
The aggregations framework collects all the data selected by the search query and
consists of many building blocks, which help in building complex summaries of the
data.
Query DSL
In Elasticsearch, searching is carried out by using query based on JSON. A query
starts with a query key word and then has conditions and filters inside in the form of
JSON object.
Mapping
Mapping is the outline of the documents stored in an index. It defines the data
type like number or string and format of the fields present in the documents and
rules to control the mapping of dynamically added fields.

You might also like