Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Elasticsearch

You're reading from  Learning Elasticsearch

Product type Book
Published in Jun 2017
Publisher Packt
ISBN-13 9781787128453
Pages 404 pages
Edition 1st Edition
Languages
Author (1):
Abhishek Andhavarapu Abhishek Andhavarapu
Profile icon Abhishek Andhavarapu

Table of Contents (11) Chapters

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)

Multi search

Multi search allows us to group search requests together. It is similar to the multi-get and the other bulk APIs. By grouping the requests together, we can save the network round trips and execute the queries in the request in parallel. We can control the number of the requests that are executed in parallel. A simple multi search request is shown here:

#Multi Search
GET chapter7/_msearch
{"type" : "product"}
{"query" : {"match_all" : {}}, "from" : 0, "size" : 10}
{"type" : "product_review"}
{"query" : {"match_all" : {}}}

The response of the multi search query is a list of responses. Each request is executed independently, and the failure of one request will not affect the others. The response to the preceding query will contain responses to two queries as shown next:

{
...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}