KeyValueQuery

A key–value search (SPEC.md §4): objects with a member key whose value, or an element of whose array value, equals value.

Queries are values: two instances with the same settings are equal, and copy derives a variant.

Constructors

Link copied to clipboard
constructor(key: String, value: JsonQueryValue, mode: ResultMode = ResultMode.WHOLE_DOCUMENT, nested: NestedHits = NestedHits.ALL, limit: Int = 100, maxBytes: Long = Long.MAX_VALUE, after: Cursor? = null, type: String? = null, order: SearchOrder = SearchOrder.ASCENDING)

A search of every document for objects whose member key has value.

Properties

Link copied to clipboard
Link copied to clipboard
val key: String
Link copied to clipboard
val limit: Int
Link copied to clipboard
Link copied to clipboard

How many documents with hits the result covers, or null for no bound (SPEC.md §4.6): the result ends after the hits of that many documents, in order, and the search reads no further document. withMaxDocuments(1) in SearchOrder.DESCENDING is every hit of the newest document that has one.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: String?
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(key: String = this.key, value: JsonQueryValue = this.value, mode: ResultMode = this.mode, nested: NestedHits = this.nested, limit: Int = this.limit, maxBytes: Long = this.maxBytes, after: Cursor? = this.after, type: String? = this.type, order: SearchOrder = this.order): KeyValueQuery

This query with the given settings changed, maxDocuments kept; the result is validated like a new instance.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

This query with maxDocuments set to n, or removed with null; n must be positive.