Elasticsearch 7 Quick Start Guide
eBook - ePub

Elasticsearch 7 Quick Start Guide

Get up and running with the distributed search and analytics capabilities of Elasticsearch

  1. 186 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Elasticsearch 7 Quick Start Guide

Get up and running with the distributed search and analytics capabilities of Elasticsearch

Book details
Book preview
Table of contents
Citations

About This Book

Get the most out of Elasticsearch 7's new features to build, deploy, and manage efficient applications

Key Features

  • Discover the new features introduced in Elasticsearch 7
  • Explore techniques for distributed search, indexing, and clustering
  • Gain hands-on knowledge of implementing Elasticsearch for your enterprise

Book Description

Elasticsearch is one of the most popular tools for distributed search and analytics. This Elasticsearch book highlights the latest features of Elasticsearch 7 and helps you understand how you can use them to build your own search applications with ease.

Starting with an introduction to the Elastic Stack, this book will help you quickly get up to speed with using Elasticsearch. You'll learn how to install, configure, manage, secure, and deploy Elasticsearch clusters, as well as how to use your deployment to develop powerful search and analytics solutions. As you progress, you'll also understand how to troubleshoot any issues that you may encounter along the way. Finally, the book will help you explore the inner workings of Elasticsearch and gain insights into queries, analyzers, mappings, and aggregations as you learn to work with search results.

By the end of this book, you'll have a basic understanding of how to build and deploy effective search and analytics solutions using Elasticsearch.

What you will learn

  • Install Elasticsearch and use it to safely store data and retrieve it when needed
  • Work with a variety of analyzers and filters
  • Discover techniques to improve search results in Elasticsearch
  • Understand how to perform metric and bucket aggregations
  • Implement best practices for moving clusters and applications to production
  • Explore various techniques to secure your Elasticsearch clusters

Who this book is for

This book is for software developers, engineers, data architects, system administrators, and anyone who wants to get up and running with Elasticsearch 7. No prior experience with Elasticsearch is required.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Elasticsearch 7 Quick Start Guide by Anurag Srivastava, Douglas Miller in PDF and/or ePUB format, as well as other popular books in Computer Science & Data Processing. We have over one million books available in our catalogue for you to explore.

Information

Year
2019
ISBN
9781789801880
Edition
1

Aggregating Datasets

Data aggregation provides us with a way to extract the information from a huge set of data and present it in a summary form. We can group the information in various buckets to get an idea of various categories or ranges. Let's take an example of a shopping site where we have complete data regarding products and their prices. Now, if we want to categorize the products into different price ranges, then we have to apply data aggregation. In the same way, we can also apply aggregation of product categories. In this chapter, we will cover the different types of aggregations that Elasticsearch provides, such as metrics, bucket, pipeline, and matrix aggregation. In this chapter, we are going to cover the following topics:
  • What is an aggregation framework?
  • Advantages of aggregations
  • Structure of aggregations
  • Metrics aggregations
  • Bucket aggregations
  • Pipeline aggregations
  • Matrix aggregations

What is an aggregation framework?

An aggregation framework collects analytic data from a set of documents and combines the information to build complex data summaries and statistics. There are four families of aggregations, each of which has a different role:
  • Metrics: This family of aggregations is based on the metrics on different fields of the Elasticsearch documents.
  • Bucketing: This is a family of aggregations that build buckets. Each individual bucket is correlated to a key and a document criterion. When executing an aggregation, the bucket criteria are evaluated on all documents. A document falls in a relevant bucket if it meets the criteria. Each aggregation process will result in a list of buckets that contain documents that belong to it.
  • Pipeline: The pipeline family aggregates the output of other aggregations and their associated metrics.
  • Matrix: A matrix is created by extracting values from multiple fields in documents. The matrix is then used to analyze this data. It does not support scripting.

Advantages of aggregations

A significant advantage of aggregations is that they can be nested in various ways. Associating an aggregation to a bucket leads to the aggregation being executed on the contents of the bucket. A bucketing aggregation can have a sub-aggregation that will act as a parent-child. There is no limit to the depth of aggregations, so complex routines can be created.

Structure of aggregations

The structure of an aggregation is shown in the following code block. The aggregation is defined under a name, the type of aggregation is declared, and the aggregation body follows. Additional aggregations can be defined in this same level of aggregations. Please refer to the following expression, using which we can write the aggregation queries:
"aggregations": {
"<aggregation_name>": {
"<aggregation_type>": {
<aggregation_body >
}
[, "meta": {[ < meta_data_body > ]}] ?
[, "aggregations": {[ < sub_aggregation > ]}] ?
}
[, "<aggregation_name_2>": {... }] *
}
In the preceding expression, we have the main aggregation block, under which we can type the name of the aggregation, its type, and then the aggregation body. We can also add the sub-aggregation along with the main aggregation.
Source values are typically extracted from a specific document field, but the source can also be values from the extracted...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. About Packt
  4. Contributors
  5. Preface
  6. Introduction to Elastic Stack
  7. Installing Elasticsearch
  8. Many as One – the Distributed Model
  9. Prepping Your Data – Text Analysis and Mapping
  10. Let's Do a Search!
  11. Performance Tuning
  12. Aggregating Datasets
  13. Best Practices
  14. Other Books You May Enjoy