Book Image

ElasticSearch Cookbook

By : Alberto Paro
Book Image

ElasticSearch Cookbook

By: Alberto Paro

Overview of this book

Table of Contents (20 chapters)
ElasticSearch Cookbook Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


After you have set the mappings and put the data in the indices, you can search. In this chapter, we will cover the different types of search queries and filters, validating queries, highlighting search results, and limiting fields. This chapter is the core of book: ultimately, everything in ElasticSearch is about serving the query and returning good quality results. To master the search, the user must understand the difference between a query and a filter, how to improve the quality, and how to speedily design more efficient queries. ElasticSearch allows you to use a rich domain specific language (DSL), a syntax language designed for searching, that covers all common needs, from a standard term query to complex Geoshape filtering.

This chapter is divided in two parts: the first part shows some API calls related to searches, and the second part covers the QueryDSL in detail.

All the recipes in this chapter require you to prepare and populate the required indices. In the code...