Book Image

Elasticsearch 7 Quick Start Guide

By : Anurag Srivastava, Douglas Miller
Book Image

Elasticsearch 7 Quick Start Guide

By: Anurag Srivastava, Douglas Miller

Overview of this book

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.
Table of Contents (10 chapters)

Introduction to data search

Elasticsearch provides a search option for queries, strings, and even bodies of text. Most search APIs are multi-index, meaning that they can be applied over multiple indices; the exception to multi-index will be explained in this chapter.

To illustrate searching properly, let's look at a specific example throughout this chapter—searching for a Facebook user. When performing a search, the routing parameter is used to point to the location of the shards in the indices that are to be searched. The following example will route to the user called cactus_flower:

POST facebook/_doc?routing=cactus_flower
"user": "cactus_flower",
"postDate": "2017-05-19T13:10:02",
"message": "Just looking for the user Cactus Flower"

This search is known as a round-robin between replicas, where each...