Companion

object Companion

Functions

Link copied to clipboard
@SinceCouchbase(value = "7.6")
fun allOf(vectorQueries: List<VectorQuery>): VectorSearchSpec
@SinceCouchbase(value = "7.6")
fun allOf(first: VectorQuery, vararg remaining: VectorQuery): VectorSearchSpec

Combines vector queries using logical AND.

Link copied to clipboard
@SinceCouchbase(value = "7.6")
fun anyOf(vectorQueries: List<VectorQuery>): VectorSearchSpec
@SinceCouchbase(value = "7.6")
fun anyOf(first: VectorQuery, vararg remaining: VectorQuery): VectorSearchSpec

Combines vector queries using logical OR.

Link copied to clipboard
fun boolean(must: ConjunctionQuery? = null, should: DisjunctionQuery? = null, mustNot: DisjunctionQuery? = null): SearchQuery
Link copied to clipboard
fun booleanField(bool: Boolean, field: String): SearchQuery

A Boolean Field query. Searches for documents where field has the value bool.

Link copied to clipboard
fun conjunction(conjuncts: List<SearchQuery>): ConjunctionQuery
fun conjunction(firstConjunct: SearchQuery, vararg remainingConjuncts: SearchQuery): ConjunctionQuery
Link copied to clipboard
fun dateRange(field: String = "_all", start: Instant? = null, inclusiveStart: Boolean = true, end: Instant? = null, inclusiveEnd: Boolean = false): SearchQuery
Link copied to clipboard
fun disjunction(disjuncts: List<SearchQuery>, min: Int = 1): DisjunctionQuery
fun disjunction(firstDisjunct: SearchQuery, vararg remainingDisjuncts: SearchQuery, min: Int = 1): DisjunctionQuery
Link copied to clipboard
fun documentId(ids: List<String>): SearchQuery

A DocId query. Searches for documents whose ID is one of ids.

Link copied to clipboard
fun geoDistance(location: GeoPoint, distance: GeoDistance, field: String = "_all"): SearchQuery
Link copied to clipboard
fun geoShape(shape: GeoShape, field: String = "_all"): SearchQuery
Link copied to clipboard
fun match(match: String, field: String = "_all", analyzer: String? = null, operator: SearchQuery.Companion.MatchOperator = MatchOperator.OR, fuzziness: Int = 0, prefixLength: Int = 0): SearchQuery
Link copied to clipboard
fun matchAll(): SearchQuery
Link copied to clipboard
fun matchNone(): SearchQuery
Link copied to clipboard
fun matchPhrase(matchPhrase: String, field: String = "_all", analyzer: String? = null): SearchQuery
Link copied to clipboard
@SinceCouchbase(value = "7.6")
fun mixedMode(searchQuery: SearchQuery, vectorQuery: VectorSearchSpec): SearchSpec

Combines the non-vector searchQuery with a vector query, using logical OR.

Link copied to clipboard
fun negation(query: SearchQuery): SearchQuery

Searches for documents that don't match query.

Link copied to clipboard
fun numericRange(field: String = "_all", min: Number? = null, inclusiveMin: Boolean = true, max: Number? = null, inclusiveMax: Boolean = false): SearchQuery
Link copied to clipboard
fun phrase(terms: List<String>, field: String = "_all"): SearchQuery
Link copied to clipboard
fun prefix(prefix: String, field: String = "_all"): SearchQuery
Link copied to clipboard
fun queryString(queryString: String): SearchQuery
Link copied to clipboard
fun regexp(regexp: String, field: String = "_all"): SearchQuery
Link copied to clipboard
fun term(term: String, field: String = "_all", fuzziness: Int = 0, prefixLength: Int = 0): SearchQuery
Link copied to clipboard
fun termRange(field: String = "_all", min: String? = null, inclusiveMin: Boolean = true, max: String? = null, inclusiveMax: Boolean = false): SearchQuery
Link copied to clipboard
@SinceCouchbase(value = "7.6")
fun vector(field: String, vector: FloatArray, numCandidates: Int = 3): VectorQuery

A Vector query, with the vector specified as a FloatArray.

@SinceCouchbase(value = "7.6.2")
fun vector(field: String, vector: String, numCandidates: Int = 3): VectorQuery

A Vector query, with the vector specified as a Base64-encoded sequence of little-endian IEEE 754 floats.

Link copied to clipboard
fun wildcard(term: String, field: String = "_all"): SearchQuery