64 throw std::invalid_argument(
"terms must not be empty in phrase_query");
81 : terms_{ std::move(terms) }
84 throw std::invalid_argument(
"terms must not be empty in phrase_query");
100 field_ = std::move(field_name);
110 [[nodiscard]]
auto encode() const -> encoded_search_query override;
113 std::vector<std::
string> terms_;
114 std::optional<std::
string> field_{};
A query that looks for exact match of several terms (in the exact order) in the index.
Definition phrase_query.hxx:46
phrase_query(std::vector< std::string > terms)
Create a new phrase query.
Definition phrase_query.hxx:80
auto encode() const -> encoded_search_query override
phrase_query(std::initializer_list< std::string > terms)
Create a new phrase query.
Definition phrase_query.hxx:60
auto field(std::string field_name) -> phrase_query &
If a field is specified, only terms in that field will be matched.
Definition phrase_query.hxx:98
Base class for full text search queries.
Definition search_query.hxx:33
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28