Companion

object Companion

Types

Link copied to clipboard
enum MatchOperator : Enum<SearchQuery.Companion.MatchOperator>

Functions

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 custom(customizer: MutableMap<String, Any?>.() -> Unit): SearchQuery

Escape hatch for specifying a custom query condition supported by Couchbase Server but not by this version of the SDK.

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
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
fun wildcard(term: String, field: String = "_all"): SearchQuery