reindexAndAwaitTask

suspend fun SearchClient.reindexAndAwaitTask(refresh: Boolean? = null, timeout: Duration = 20.minutes, waitForActiveShards: String? = null, requestsPerSecond: Int? = null, requireAlias: Boolean? = null, scroll: Duration? = null, slices: Int? = null, maxDocs: Int? = null, pollInterval: Duration = 5.seconds, block: ReindexDSL.() -> Unit): ReindexResponse?

Reindexes using a background task in ES and polls for that task to complete every pollInterval for a maximum of timeout. Note: the same timeout is passed on to the reindex task

Returns a nullable ReindexResponse