41 : vector_field_name_{ std::move(vector_field_name) }
44 if (vector_query_.value().empty()) {
45 throw std::invalid_argument(
"the vector_query cannot be empty");
59 vector_query(std::string vector_field_name, std::string base64_vector_query)
60 : vector_field_name_{ std::move(vector_field_name) }
61 , base64_vector_query_{ std::move(base64_vector_query) }
63 if (base64_vector_query_.value().empty()) {
64 throw std::invalid_argument(
"the base64_vector_query cannot be empty");
81 throw std::invalid_argument(
"The num_candidates cannot be less than 1");
110 [[nodiscard]]
auto encode() const -> encoded_search_query;
113 std::
string vector_field_name_;
114 std::uint32_t num_candidates_{ 3 };
115 std::optional<std::vector<double>> vector_query_{};
116 std::optional<std::string> base64_vector_query_{};
117 std::optional<double> boost_{};
Definition vector_query.hxx:29
vector_query(std::string vector_field_name, std::string base64_vector_query)
Creates a vector query.
Definition vector_query.hxx:59
auto encode() const -> encoded_search_query
auto num_candidates(std::uint32_t num_candidates) -> vector_query &
The number of results that will be returned from this vector query.
Definition vector_query.hxx:78
vector_query(std::string vector_field_name, std::vector< double > vector_query)
Creates a vector query.
Definition vector_query.hxx:40
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)...
Definition vector_query.hxx:98
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28