Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Elasticsearch
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learning Elasticsearch

Learning Elasticsearch

By : Andhavarapu
4.3 (4)
close
close
Learning Elasticsearch

Learning Elasticsearch

4.3 (4)
By: Andhavarapu

Overview of this book

Elasticsearch is a modern, fast, distributed, scalable, fault tolerant, and open source search and analytics engine. You can use Elasticsearch for small or large applications with billions of documents. It is built to scale horizontally and can handle both structured and unstructured data. Packed with easy-to- follow examples, this book will ensure you will have a firm understanding of the basics of Elasticsearch and know how to utilize its capabilities efficiently. You will install and set up Elasticsearch and Kibana, and handle documents using the Distributed Document Store. You will see how to query, search, and index your data, and perform aggregation-based analytics with ease. You will see how to use Kibana to explore and visualize your data. Further on, you will learn to handle document relationships, work with geospatial data, and much more, with this easy-to-follow guide. Finally, you will see how you can set up and scale your Elasticsearch clusters in production environments.
Table of Contents (11 chapters)
close
close
10
Exploring Elastic Stack (Elastic Cloud, Security, Graph, and Alerting)

Search templates

Search templates are very similar to stored procedures in the relational database. Commonly used queries can be defined as a template, and the applications using Elasticsearch can simply refer to the query by its ID. The template accepts parameters, which can be specified at the runtime. Search templates are stored on the server side and can be modified without changes to the client code. Templates are expressed using the Mustache template engine. For more information on mustache, please visit http://mustache.github.io/mustache.5.html.

Let's start by defining a template query to find all the products by their name. The query is as follows:

#Define Template
POST _search/template/find_product_by_name
{
"query" : {
"match" : {
"product_name": "{{ product_name }}"
}
}
}

Once the template is defined, you...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY