count
suspend fun SearchClient.count(target: String? = null, rawJson: String? = null, allowNoIndices: Boolean? = null, expandWildcards: ExpandWildCards? = null, ignoreThrottled: Boolean? = null, ignoreUnavailable: Boolean? = null, minScore: Double? = null, preference: String? = null, routing: String? = null, terminateAfter: Int? = null): CountResponse
Variant of the _count api that takes an optional rawBody. Leaving the body empty means doing a match_all search.
suspend fun SearchClient.count(target: String? = null, query: ESQuery, allowNoIndices: Boolean? = null, expandWildcards: ExpandWildCards? = null, ignoreThrottled: Boolean? = null, ignoreUnavailable: Boolean? = null, minScore: Double? = null, preference: String? = null, routing: String? = null, terminateAfter: Int? = null): CountResponse
Variant of the _count api that allows you to pass in an ESQuery object. It will be set as the query on the json body that is sent to _count.
suspend fun SearchClient.count(target: String? = null, allowNoIndices: Boolean? = null, expandWildcards: ExpandWildCards? = null, ignoreThrottled: Boolean? = null, ignoreUnavailable: Boolean? = null, minScore: Double? = null, preference: String? = null, routing: String? = null, terminateAfter: Int? = null, block: SearchDSL.() -> Unit): CountResponse
Variant of the _count api that takes a search dsl block so you can set the query. Note, not all parts of the search dsl are supported by _count. E.g. adding sorting would be an error.