There are times when you need to perform more than one request on Elasticsearch. For this, Elasticsearch offers a bulk API with the
_bulk endpoint that allows you to perform bulk operations in a single request, be it indexing, updating, or deleting more than one document, getting more than one document using more than one document ID, or executing more than one query in a single request. The best part is that bulk operations can be executed on more than one
doc type in a single request. The Elasticsearch Java client also offers a
BulkProcessor class, which will be covered in a later section of this chapter. For now, let's explore the bulk requests.
The Python client provides a helper module to create bulk operations. ...