elasticsearch

Understanding Replication in Elasticsearch

August 8, 2017 by

In order to understand how replication works in Elasticsearch, you should already understand how sharding works, so be sure to check that out first. Hardware can fail at any time, and software can be buggy at times. Let’s face it, sometimes things just stop working. The more hardware capacity you add, the higher the risk… read more

Understanding Sharding in Elasticsearch

August 8, 2017 by

Elasticsearch is extremely scalable due to its distributed architecture. One of the reasons this is the case, is due to something called sharding. If you have worked with other technologies such as relational databases before, then you may have heard of this term. Before getting into what sharding is, let’s first talk about why it… read more

Introduction to the Elasticsearch Architecture

August 8, 2017 by

This article is an introduction to the physical architecture of Elasticsearch, being how documents are distributed across virtual or physical machines and how machines work together to form what is known as a cluster. Nodes & Clusters To start things off, we will begin by talking about nodes and clusters, which are at the centre… read more

Aggregations

November 12, 2016 by
Part 35 of 35 in the Complete Guide to Elasticsearch series

Aggregations are a way of grouping and extracting statistics from your data. In case you are familiar with relational databases, you can think of this as the equivalent of SQL’s GROUP BY clause and aggregate functions such as SUM. Interestingly, Elasticsearch provides a rather powerful feature that allows you to execute searches and return hits… read more

Sorting Results

November 12, 2016 by
Part 34 of 35 in the Complete Guide to Elasticsearch series

In this article we will be taking a look at how to sort the search results. When retrieving documents from Elasticsearch, it is possible to sort the search results. If you are familiar with relational databases, then this is equivalent of the ORDER BY query clause. I will perform a search for the term pasta… read more

Pagination

November 12, 2016 by
Part 33 of 35 in the Complete Guide to Elasticsearch series

In this article, you will learn how to do pagination in Elasticsearch. In the previous article, I introduced the size parameter, which I will also be using to paginate through search results. While the size parameter specifies how many documents should be returned in the results, the from parameter specifies which document index to start… read more

Filtering Results

November 12, 2016 by
Part 31 of 35 in the Complete Guide to Elasticsearch series

This article explains how to filter results. Remember that there are two query contexts; the query context and filter context. Queries that are in query context affect the relevance scores of documents depending on how well they match, while queries in a filter context do not affect relevance scores. Therefore, filter queries can be used… read more

Boosting

November 12, 2016 by
Part 30 of 35 in the Complete Guide to Elasticsearch series

This article explains how to boost terms and query clauses when searching in Elasticsearch. When searching for multiple terms, it is sometimes useful to be able to assign a higher or lower priority to certain terms. Elasticsearch provides a way of doing this by specifying a positive floating point number. Below is an example query.… read more

Proximity Searches

November 12, 2016 by
Part 29 of 35 in the Complete Guide to Elasticsearch series

Now that we have taken a look at fuzzy searches, it’s time to take a quick look at proximity searches, which are somewhat related. We looked at phrase searches in a previous lecture, where the search query is enclosed within quotation marks and the terms must be in the correct order. A proximity search allows… read more