suspend fun SearchClient.bulk(payload: String, target: String? = null, pipeline: String? = null, refresh: Refresh? = null, routing: String? = null, timeout: Duration? = null, waitForActiveShards: String? = null, requireAlias: Boolean? = null, source: String? = null, sourceExcludes: String? = null, sourceIncludes: String? = null, extraParameters: Map<String, String>? = null): <Error class: unknown class> Send a single bulk request. Consider using the variant that creates a BulkSession.
suspend fun SearchClient.bulk(bulkSize: Int = 100, target: String? = null, pipeline: String? = null, refresh: Refresh? = Refresh.WaitFor, routing: String? = null, timeout: Duration? = null, waitForActiveShards: String? = null, requireAlias: Boolean? = null, source: String? = null, sourceExcludes: String? = null, sourceIncludes: String? = null, failOnFirstError: Boolean = false, callBack: BulkItemCallBack? = null, closeOnRequestError: Boolean = true, extraParameters: Map<String, String>? = null, block: suspend BulkSession.() -> Unit) Creates a bulk session that allows you to index, create, or delete items via the convenient kotlin DSL.
The BulkSession takes care of firing off bulk requests with the specified bulkSize so you don't have to manually construct bulk requests.
Parameters
if you specify a target, you don't have to specify an index on each operation
You can use the callback to deal with individual item responses. This is useful for dealing with e.g. version conflicts or other non-fatal item problems. Also, you can get to things like seq_no and primary_term for optimistic locking.
If you are expecting all items to succeed, you should set failOnFirstError to true.
For the rest of the parameters, see the official bulk REST documentation. All known parameters are supported. Please file a bug if you think something is missing.