Class VectorQuery
java.lang.Object
com.couchbase.client.java.search.vector.VectorQuery
-
Method Summary
Modifier and TypeMethodDescriptionboost
(double boost) Can be used to control how much weight to give the results of this query vs other queries.static VectorQuery
static VectorQuery
numCandidates
(int numCandidates) This is the number of results that will be returned from this vector query.prefilter
(SearchQuery prefilter) This is the prefilter query.toCore()
-
Method Details
-
create
- Parameters:
vectorField
- the document field that contains the vector.vector
- the vector to search for.
-
create
@SinceCouchbase("7.6.2") public static VectorQuery create(String vectorField, String base64EncodedVector) - Parameters:
vectorField
- the document field that contains the vector.base64EncodedVector
- the vector to search for, as a Base64-encoded sequence of little-endian IEEE 754 floats.
-
numCandidates
This is the number of results that will be returned from this vector query.- Returns:
- this, for chaining.
-
prefilter
This is the prefilter query.The server first executes this non-vector query to get an intermediate result. Then it executes the vector query on the intermediate result to get the final result.
If no prefilter is specified, the server executes the vector query on all indexed documents.
- Returns:
- this, for chaining.
-
boost
Can be used to control how much weight to give the results of this query vs other queries.See the FTS documentation for details.
- Returns:
- this, for chaining.
-
toCore
-