#include <couchbase/vector_query.hxx>
|
| vector_query (std::string vector_field_name, std::vector< double > vector_query) |
| Creates a vector query.
|
|
| vector_query (std::string vector_field_name, std::string base64_vector_query) |
| Creates a vector query.
|
|
auto | num_candidates (std::uint32_t num_candidates) -> vector_query & |
| The number of results that will be returned from this vector query.
|
|
auto | boost (double boost) -> vector_query & |
| The boost parameter is used to increase the relative weight of a clause (with a boost greater than 1) or decrease the relative weight (with a boost between 0 and 1).
|
|
auto | encode () const -> encoded_search_query |
|
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ vector_query() [1/2]
vector_query |
( |
std::string | vector_field_name, |
|
|
std::vector< double > | vector_query ) |
|
inline |
Creates a vector query.
- Parameters
-
vector_field_name | the document field that contains the vector |
vector_query | the vector query to run. Cannot be empty. |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ vector_query() [2/2]
vector_query |
( |
std::string | vector_field_name, |
|
|
std::string | base64_vector_query ) |
|
inline |
Creates a vector query.
- Parameters
-
vector_field_name | the document field that contains the vector |
base64_vector_query | a base64-encoded sequence of little-endian IEEE 754 floats |
std::string base64_encoded_query = "RWFzdGVyIGVnZyE=";
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ boost()
The boost parameter is used to increase the relative weight of a clause (with a boost greater than 1) or decrease the relative weight (with a boost between 0 and 1).
- Parameters
-
- Returns
- this vector_query for chaining purposes.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ encode()
auto encode |
( |
| ) |
const -> encoded_search_query |
|
nodiscard |
- Returns
- encoded representation of the query.
- Since
- 1.0.0
- Internal
- Internal interface
◆ num_candidates()
auto num_candidates |
( |
std::uint32_t | num_candidates | ) |
-> vector_query&
|
|
inline |
The number of results that will be returned from this vector query.
Defaults to 3.
- Parameters
-
num_candidates | the number of results returned |
- Returns
- this vector_query for chaining purposes
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
The documentation for this class was generated from the following file: