all Of
@SinceCouchbase(value = "7.6" )
Content copied to clipboard
@SinceCouchbase(value = "7.6" )
Content copied to clipboard
Combines vector queries using logical AND.
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 ANDs together multiple vector queries.
val spec = SearchSpec.allOf(
SearchSpec.vector("review", floatArray),
SearchSpec.vector("review", otherFloatArray),
)
//sampleEnd
}