
- 404 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Learning Elasticsearch
About this book
Store, search, and analyze your data with ease using Elasticsearch 5.xAbout This Book⢠Get to grips with the basics of Elasticsearch concepts and its APIs, and use them to create efficient applications⢠Create large-scale Elasticsearch clusters and perform analytics using aggregation⢠This comprehensive guide will get you up and running with Elasticsearch 5.x in no timeWho This Book Is ForIf you want to build efficient search and analytics applications using Elasticsearch, this book is for you. It will also benefit developers who have worked with Lucene or Solr before and now want to work with Elasticsearch. No previous knowledge of Elasticsearch is expected.What You Will Learn⢠See how to set up and configure Elasticsearch and Kibana⢠Know how to ingest structured and unstructured data using Elasticsearch⢠Understand how a search engine works and the concepts of relevance and scoring⢠Find out how to query Elasticsearch with a high degree of performance and scalability⢠Improve the user experience by using autocomplete, geolocation queries, and much more⢠See how to slice and dice your data using Elasticsearch aggregations.⢠Grasp how to use Kibana to explore and visualize your data⢠Know how to host on Elastic Cloud and how to use the latest X-Pack features such as Graph and AlertingIn DetailElasticsearch 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.Style and approachThis comprehensive guide will get you started with Elasticsearch 5.x, so you build a solid understanding of the basics. Every topic is explained in depth and is supplemented with practical examples to enhance your understanding.
Tools to learn more effectively

Saving Books

Keyword Search

Annotating Text

Listen to it instead
Information
All About Search
- Structured queries
- Full-text queries
- Sort and pagination
- Relevance
- Routing
- Caching
Different types of queries
- Structured queries: Structured queries are used to query numbers, dates, statuses, and so on. These are similar to queries supported by a SQL database. For example, whether a number or date falls within a range or to find all the employees with John as the first name and so on
- Full-text search queries: Full-text search queries are used to search text fields. When you send a full-text query to Elasticsearch, it first finds all the documents that match the query, and then the documents are ranked based on how relevant each document is to the query. We will discuss relevance in detail in the Relevance section
Sample data
#Delete existing index if any
DELETE chapter6
#Mapping
PUT chapter6
{
"settings": {},
"mappings": {
"product": {
"properties": {
"product_name": {
"type": "text",
"analyzer": "english"
},
"description" : {
"type": "text",
"analyzer": "english"
}
}
}
}
}
#Index Documents
PUT chapter6/product/1
{
"product_name": "Men's High Performance Fleece Jacket",
"description": "Best Value. All season fleece jacket",
"unit_price": 79.99,
"reviews": 250,
"release_date": "2016-08-16"
}
PUT chapter6/product/2
{
"product_name": "Men's Water Resistant Jacket",
"description": "Provides comfort during biking and hiking",
"unit_price": 69.99,
"reviews": 5,
"release_date": "2017-03-02"
}
PUT chapter6/product/3
{
"product_name": "Women's wool Jacket",
"description": "Helps you stay warm in winter",
"unit_price": 59.99,
"reviews": 10,
"release_date": "2016-12-15"
}
Querying Elasticsearch
- By passing the search request as query parameters.
- By passing the search request in the request body.
GET chapter6/product/_search?q=product_name:jacket
POST chapter6/product/_search
{
"query": {
"term": {
"product_name" : "jacket"
}
}
}
Table of contents
- Title Page
- Copyright
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Customer Feedback
- Preface
- Introduction to Elasticsearch
- Setting Up Elasticsearch and Kibana
- Modeling Your Data and Document Relations
- Indexing and Updating Your Data
- Organizing Your Data and Bulk Data Ingestion
- All About Search
- More Than a Search Engine (Geofilters, Autocomplete, and More)
- How to Slice and Dice Your Data Using Aggregations
- Production and Beyond
- Exploring Elastic Stack (Elastic Cloud, Security, Graph, and Alerting)
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app