Complete Guide to Elasticsearch
4.1 (713 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
3,495 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Complete Guide to Elasticsearch to your Wishlist.

Add to Wishlist

Complete Guide to Elasticsearch

Learn Elasticsearch from scratch and lay the foundation for learning the ELK stack (Elasticsearch, Logstash & Kibana).
4.1 (713 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
3,495 students enrolled
Created by Bo Andersen
Last updated 7/2017
Current price: $10 Original price: $95 Discount: 89% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 6.5 hours on-demand video
  • 2 Articles
  • 9 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Be able to build a powerful search engine with Elasticsearch
  • Understand the theory of Elasticsearch in details
  • Write complex search queries
  • Be proficient with the concepts and terminology of Elasticsearch
View Curriculum
  • Knowledge of JSON

### This course is currently being completely remade for higher quality and to be 100% up to date with Elasticsearch 5.x and 6.x alpha. Fresh content is added almost daily, and 8+ hours of new content is coming your way in the coming weeks! ###

Do you want to learn the popular search engine, Elasticsearch, from the beginning and become a professional in no time? This course is an excellent starting point for you to quickly learn the basics of Elasticsearch and to put your knowledge to work in just a few hours! Elasticsearch is an extremely popular search engine and will be an excellent addition to your CV - even if you are already familiar with other search engines or frameworks such as Apache Lucene, Apache Solr, Amazon CloudSearch, etc.

The course is a combination of theory and learning by doing. Before giving examples of how to perform certain queries, you will have been equipped with the necessary theory in advance. This ensures that you not only know how to perform powerful searches with Elasticsearch, but that you also understand the relevant theory.

The course starts from the absolute beginning, and no prior experience or knowledge with Elasticsearch is required. We will walk through all of the most important aspects of Elasticsearch, and at the end of this course, you will be able to build powerful search engines. This could be for a website where you could build Google-like search functionality, for example.

So, join me in this course and learn to build powerful search engines with Elasticsearch today!

About Elasticsearch

Elastic search is a search engine that is developed by the company Elasticsearch BV. The search engine is built on Apache Lucene and has become extremely popular in recent years, due to its powerful features and ease of use.

Who is the target audience?
  • This course is intended for people who either want to learn Elasticsearch and have no prior experience with this search engine, or people who have basic experience with Elasticsearch and who would like to expand on their knowledge or refreshen their memory.
  • This course does not cover all of the details of Elasticsearch, but covers the basics in details. The most important parts of Elasticsearch have been carefully chosen. If you want to start with Elasticsearch or have some knowledge of the search engine, then this course is an excellent starting point for you.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
89 Lectures
Getting Started
3 Lectures 16:15

Introduction to the course and what you will learn.

Preview 04:37

What is Elasticsearch all about? Why is it so popular, and who uses it?

Preview 05:33

Overview of the Elastic Stack (including the ELK stack). See how Elasticsearch fits into the bigger picture.

Preview 06:05

Test your understand of what the purpose of each part of the Elastic Stack is.

Elastic Stack
4 questions
Architecture of Elasticsearch
10 Lectures 30:07

Introduction to this section on the Elasticsearch architecture.

Introduction to this section

Explanation of what a clusters and nodes are.

Nodes & Clusters

Test your understanding of clusters and nodes.

Nodes & Clusters
3 questions

Explanation of what indices and documents are.

Indices & Documents

A brief mention of what types are in Elasticsearch.

A word on types

Explanation of what sharding is and which purpose it serves.


Test your understanding of sharding.

4 questions

Explanation of how replication works.


Test your understanding of replication.

6 questions

Explanation of how replicas are kept synchronized when adding, removing or updating documents.

Keeping replicas synchronized

Explanation of how a search query is handled within an Elasticsearch cluster.

Searching for data

Explanation of how documents are distributed across the nodes of a cluster to prevent congestion.

Distributing documents across nodes

Brief summary of this section of the course.

Wrap up
Installing Elasticsearch & Kibana
8 Lectures 34:03

Learn how to run both Elasticsearch and Kibana cross-platform with Docker, with the provided Docker Compose file.

Preview 05:10

Learn how to install Elasticsearch in the traditional way for macOS and Linux.

Preview 05:20

Learn how to install Elasticsearch in the traditional way for Windows.

Preview 05:36

Overview of the Elasticsearch configuration options that you would most commonly need to change.

Configuring Elasticsearch

Learn how to install Kibana in the traditional way for macOS and Linux.

Preview 02:52

Learn how to install Kibana in the traditional way for Windows.

Preview 02:42

Overview of the Kibana configuration options that you would most commonly need to change.

Configuring Kibana

Introduction to the Kibana interface and the Console tool that we will be using throughout the course.

Introduction to Kibana and dev tools
Managing Documents
12 Lectures 37:28

Having a cluster set up, it's time to create an index.

Creating an index

With an index at hand, let's see how to add documents to it.

Adding documents

With documents in the index, let's see how to retrieve one by specifying the document ID.

Retrieving documents by ID

Adding documents is one thing, but replacing them is another. That's what this lecture is about.

Replacing documents

Learn how to update documents that have already been added to the Elasticsearch cluster.

Updating documents

Learn how to update documents more dynamically with scripted updates.

Scripted updates

Learn how to perform a so-called upsert, which means to insert a document if it doesn't already exist, and update the existing one otherwise.


Learn how to delete documents that have been added to an index. Both the simplest possible way, but also by deleting documents matching certain criteria.

Deleting documents

Learn how to delete an existing index.

Deleting indices

You already know how to add, update, and remove documents. This can also be done for many documents at once through batch processing, which you will see in this lecture.

Batch processing

An index without data is no fun. Let's import some test data, being 1000 documents.

Importing test data with cURL

The cluster is up and running, and documents have been added to an index. But what does the cluster look like? Let's take a look.

Exploring the cluster
11 Lectures 52:50

Introduction to what mapping in Elasticsearch is all about.

Introduction to mapping

Mapping can be added explicitly, but dynamic mapping may also be used. Learn what it is in this lecture.

Dynamic mapping

Documents contain meta fields. Get an overview of meta fields in this lecture.

Meta fields

Get an overview of the most important field data types in this lecture.

Field data types

Let's add a mapping to an existing index.

Adding mappings to existing indices

How can we change mappings that have already been added? See how in this lecture.

Changing existing mappings

See how to configure mappings with parameters.

Mapping parameters

See how to add additional mappings to fields.

Adding multi-fields mappings

Date formats can be customized and configured. See how in this lecture.

Defining custom date formats

Learn how to handle when documents were added before adding a mapping (with dynamic mapping disabled).

Picking up new fields without dynamic mapping

Brief recap on what we covered in this section on mapping.

Wrap up
Retrieving Data
18 Lectures 01:33:42
A quick note

This lecture introduces the basics of searching, without going into details and remains at a theoretical level. The purpose is to give you the most basic information that you need to know about searching, before beginning to perform actual search queries. After completing this lecture, you will have a basic idea about searching in Elasticsearch, and you will be ready to move on to performing search queries in the following lectures.

Introduction to searching

This lecture introduces searching with query strings by issuing basic queries within the request URL. You will learn how to use the query string to perform simple searches such as match queries against an index.

Searching with query strings: Basics

Now that you have learned how to perform simple query string searches, we will expand on this knowledge by going through using boolean logic within search queries. This allows for much more complex queries than what is possible with what was discussed in the previous lecture, and you will learn how to use boolean logic within search queries, by example.

Searching with query strings: Bool query

Now that you have learned the basics of performing query string searches as well as bool queries, we will take a look at phrase queries. Phrase queries can be used to search for phrases within full text fields, rather than just individual terms that we covered in a previous lecture. After completing this lecture, you will understand the concept of phrase queries and be able to perform such queries.

Searching with query strings: Phrase query

This lecture discusses that one must escape special characters when searching with query strings, and concludes on query string searches. At this point, you should have a good idea about when and how to perform searches with query strings.

Searching with query strings: Remarks

Having walked through how to perform searches with query strings, it is time to take a look at the other way of searching in Elasticsearch, namely searching with the query DSL. The query DSL provides a more flexible way of searching that allows for more advanced queries. This lecture introduces the query DSL and shows how to perform simple full text queries. Afterwards, you will know the basics of the query DSL, as well as how to perform simple query DSL searches, namely full text searches.

Searching with Query DSL: Full text queries

Having introduced the query DSL and full text queries in the previous lecture, this lecture introduces term level queries and shows examples of the various term level queries. You will learn the basics of term level queries using the query DSL, and you will be able to perform term level queries yourself, following the provided examples.

Searching with Query DSL: Term level queries

This lecture introduces compound queries and shows how to make use of these to construct advanced search queries. This includes examples of various query types such as the bool query, which allows for using boolean logic within queries, exactly as discussed with the query string searches, only with a different syntax. After completing this lecture, you will know how to construct advanced queries using boolean logic and the most important query types.

Searching with Query DSL: Compound queries

In this lecture, you will learn how to perform searches across indexes and types. Sometimes it is useful to not only search for one particular type, for instance, and this lecture shows you how to do just that.

Searching across indexes and types

This lecture discusses how to use fuzzy searches, something that can be useful to account for typos, for instance. The lecture shows how to perform fuzzy searches with both the query string approach as well as the query DSL. At the end of this lecture, you will have an overall understanding of how fuzzy searches work in Elasticsearch, and will be able to use this knowledge to implement fuzzy searches in an application.

Fuzzy searches

Having looked at fuzzy searches in the previous lecture, it is now time to take a look at proximity searches, which are somewhat similar. In this lecture, you will learn how proximity searches allow for the order of terms to be different within a phrase search.

Proximity searches

Boosting terms can be useful for making one term more important than another. This lecture teaches you how to boost terms within search queries, both with query string searches and query DSL searches.


Filtering results does not affect the relevance scores of documents. This is not the case with query context constraints specified within queries. You will learn the two different query contexts within this lecture, and you will learn when to use one over the other.

Filtering results

You might not always want the default result set size to be applicable to your searches. In this lecture, you will learn how to change the size of the result set.

Changing the size of result sets

Pagination is an important concept of Elasticsearch, as it is used for adding search functionality to applications such as web applications. Luckily, pagination is very simple in Elasticsearch, so after this short lecture, you will know how to do pagination.


Sometimes it may be useful to order the results based on one or more fields, much like in relational databases. Learn how to easily sort the result set in this lecture.

Sorting results

Aggregations are incredibly useful for grouping and extracting statistics from the data within an Elasticsearch index. There are three groups of aggregations, but many more types of aggregations. This lecture gives you an overview and examples of the most important types of aggregations that you should know.

Building a Web Application Search Engine
6 Lectures 47:49
This lecture introduces the web application that we will build throughout this section, and also talks about the official client libraries that are available.
Introducing Application & Client Libraries

Having introduced the application as well as client libraries, it is time to add some basic search functionality to the application. This lecture walks through the process of adding a simple match query which searches through the products within the Elasticsearch index.

Adding a simple query

Search queries may result in many matching documents, so the application needs a way for the user to browse through these, without displaying all of the results on a single page. This lecture therefore shows how to add pagination to a search query in the context of a web application.

Paginating search results

Accounting for spelling mistakes and typos is a nice feature to have for a search engine. This lecture adds fuzziness to the query, such that the matching of documents will be more flexible in regards to the search query.

Adding fuzziness

This lecture adds filters to the search query, such that the user of the web application can filter the results by price range, status and category. This lecture also uses aggregations to fetch the number of documents matching each filter.

Aggregations & Filters

To finish the application, a page for viewing a given product is implemented by simply fetching the corresponding product's document from the index by ID.

Adding product details page
1 Lecture 00:47

This lecture recaps on what was accomplished in this course and includes final notes.

Last words & summing up
Legacy Content (version 2.x)
20 Lectures 01:19:42

This lecture introduces the course and talks about how the course is structured.

Introduction to this course

This is an introduction to Elasticsearch that explains the overall concepts of the search engine and why it is so popular. This presentation will give you a good idea of what Elasticsearch is all about.

Introduction to Elasticsearch

There are many terms being used when working with Elasticsearch. This lecture gives you an overview of the most important terminology that will be used throughout this entire course. Terms such as clusters, nodes, indexes and documents are explained, and after completing this lecture, you should have a solid understanding of what an Elasticsearch cluster consists of.


After having introduced Elasticsearch and learned the most important concepts of the search engine, it is now time to learn how to actually install Elasticsearch. The lecture walks through every step of the process, from download to finish, and you will learn how to install Elasticsearch on your own computer.

Installing Elasticsearch

Now that you have learned how to install Elasticsearch, it is time to install a tool named Kibana. The lecture walks through every step of the process, from download to finish, and you will learn how to install Kibana on your own computer.

Installing Kibana

Now that you have learned how to install Kibana, it is time to install a Kibana plugin named Sense, which will be used throughout the entire course. The lecture walks through the process, after which you will be able to install Sense on your own computer.

Installing Sense

Now that all of the needed software has been installed, it is time to add an index to the Elasticsearch cluster. This lecture shows you how to do so, and you will be able to use this knowledge to create an index in your own Elasticsearch cluster.

Creating an index

Having created an index, it is also worth knowing how to remove one, which you will learn in this lecture.

Deleting an index

This lecture gives an overview of what mapping is in the context of Elasticsearch. It introduces the concepts of field data types, meta fields as well as explicit and dynamic mapping. You will learn what mapping is and have a general idea about the before mentioned concepts.

Introduction to mapping

Having introduced mapping in general, this lecture takes a closer look at the various data types that are available for fields within Elasticsearch. You will learn the characteristics of most of the available data types and when to use them.

Field data types

This lecture expands upon an earlier lecture where meta fields were introduced. You will learn what meta fields are, as well as the semantics of each of them, so you will know what they mean when you see them in search results throughout the course.

Meta fields

Now that you have learned about mapping, it is time to add a mapping to an index. You will see how a mapping can be added for a "product" type, where each field and its data type will be defined. This will give you the information that you need to add a mapping.

Adding mappings

An Elasticsearch cluster is no fun without any data in it. In this lecture, you will see how data can be imported into an Elasticsearch index. The test data used in this lecture has been added as material so that you can download the test data file and add it to your own cluster if you want.

Adding test data

In this lecture, you will see how a document can be added to an index. Specifically, a document of the type "product" will be added, and afterwards, you will know how to add any kind of documents to an Elasticsearch index.

Adding documents

Sometimes it can be useful to replace a document with a new version of it. This lecture shows just that, and at the end of it, you will be able to replace documents within an index.

Replacing documents

Instead of replacing entire documents, it is also possible to only update specific fields of a document. The lecture shows how the price of a product can be updated, without having to supply the entire document. Conceptually, this is quite similar to how update queries work within relational databases, and you will be able to apply this knowledge and update documents in your own index.

Updating documents

You have already learned how to add, replace and update documents, but it is also useful to know how to remove documents from an index. This is the focus of this lecture, where a product will removed, and at the end of it, you will know how to issue a simple request to delete a given document.

Deleting documents

In the preceding lectures, you have learned how to add and modify single documents within an index. But what if you need to perform these operations on lots of documents? This lecture shows you how batch processing can be useful for sending batches of requests to a cluster and also discusses the advantages of doing so. You will learn how to perform CRUD operations in batches and when this is a good idea.

Batch processing

Before we get into searching, we begin by simply fetching a document by ID from an index, and you will learn how to do this with a simple request.

Retrieving document by ID
About the Instructor
Bo Andersen
4.3 Average rating
949 Reviews
4,856 Students
3 Courses
Lead Developer

My name is Bo Andersen and I am a software developer from Denmark.

I am a software developer who has previously worked a successful company, which operates one of the largest websites in Denmark, before deciding to teach full time. I have worked with programming for a decade, primarily with web development. I have a bachelor's degree in computer science and have worked with programming in my spare time before, during and after completing my education.

If you would like to see my complete resume and experience, please have a look at my LinkedIn profile. I have also been blogging about programming subjects for a few years, so I encourage you to have a look at my website if you are curious.