count

abstract suspend fun count(query: KeyValueQuery, atMost: Long = Long.MAX_VALUE): Long(source)

How many hits search returns for query on the current state, counting no further than atMost (SPEC.md §4.7): the same candidates and matches, with the query's after, type, mode and nested-hit filter, but no hit's JSON is read, and limit and maxBytes don't apply. count(query, n) == n tells whether there are at least n hits, and stops at the n-th. Refuses what search refuses; a negative atMost throws IllegalArgumentException.


abstract suspend fun count(query: JsonPathQuery, atMost: Long = Long.MAX_VALUE): Long(source)

How many hits the JSONPath search returns for query, counting no further than atMost; see the other count.


abstract suspend fun count(query: DocumentKeyQuery, atMost: Long = Long.MAX_VALUE): Long(source)

How many documents the key-order search returns for query, counting no further than atMost; see the other count.