any Of
@SinceCouchbase(value = "7.6" )
Content copied to clipboard
@SinceCouchbase(value = "7.6" )
Content copied to clipboard
Combines vector queries using logical OR.
CAVEAT: Nested compound vector queries like "A or (B and C)"
are not supported.
Samples
import com.couchbase.client.kotlin.Cluster
import com.couchbase.client.kotlin.search.Highlight
import com.couchbase.client.kotlin.search.NumericRange
import com.couchbase.client.kotlin.search.SearchFacet
import com.couchbase.client.kotlin.search.SearchQuery
import com.couchbase.client.kotlin.search.SearchResult
import com.couchbase.client.kotlin.search.SearchSort
import com.couchbase.client.kotlin.search.SearchSort.Companion.byField
import com.couchbase.client.kotlin.search.SearchSort.Companion.byId
import com.couchbase.client.kotlin.search.SearchSpec
import com.couchbase.client.kotlin.search.VectorQuery
import com.couchbase.client.kotlin.search.execute
fun main() {
//sampleStart
// A search specification that ORs together multiple vector queries.
val spec = SearchSpec.anyOf(
SearchSpec.vector("review", floatArray),
SearchSpec.vector("review", otherFloatArray),
)
//sampleEnd
}