bulkRequestFailed

abstract fun bulkRequestFailed(e: Exception, ops: List<Pair<String, String?>>)

Called when elasticsearch responds with an error. By default, this is considered fatal and the bulk session closes and is no longer usable and an exception will be thrown. You may choose to keep it open by setting closeOnRequestError to false when you create the BulkSession to e.g. implement a retry strategy or simply drop the failed bulk requests.

Note, exceptions may happen for all sorts of reasons, including the cluster being unreachable, temporarily unavailable, or configuration errors.

Parameters

e

the exception that was thrown. If of type RestException, you may be able to implement some recover procedure

ops

the list of operations and their payload (or null for e.g. delete)