June 2017
Beginner to intermediate
404 pages
8h 22m
English
Multi Get API is used to retrieve multiple documents using a single request. A simple request to get the documents based on the unique identifier is shown here:
POST chapter5/product/_mget { "ids" : ["2", "3"] }
The response of the preceding query is as follows:
{ "docs": [ { "_index": "chapter5", "_type": "product", "_id": "2", "_version": 2, "found": true, "_source": { "product_name": "Button down Shirt", "unit_price": "40", "shipping_price": 6.5 } }, { "_index": "chapter5", "_type": "product", "_id": "3", "_version": 2, "found": true, "_source": { "product_name": "Non-Iron Solid Shirt", "unit_price": "40", "shipping_price": 5 } } ] }
To retrieve documents from different index/types, metadata information can be specified ...
Read now
Unlock full access