56 : match_{ std::move(match) }
73 throw std::invalid_argument(
"prefix_length must be positive");
76 prefix_length_ = length;
93 analyzer_ = std::move(analyzer_name);
111 field_ = std::move(field_name);
144 operator_ = concatenation_operator;
154 [[nodiscard]]
auto encode() const -> encoded_search_query override;
158 std::optional<std::uint32_t> prefix_length_{};
159 std::optional<std::string> analyzer_{};
160 std::optional<std::string> field_{};
161 std::optional<std::uint32_t> fuzziness_{};
162 std::optional<couchbase::match_operator> operator_{};
A match query analyzes the input text and uses that analyzed text to query the index.
Definition match_query.hxx:45
match_query(std::string match)
Create a new match query.
Definition match_query.hxx:55
auto prefix_length(std::uint32_t length) -> match_query &
Require that the term also have the same prefix of the specified length (must be positive).
Definition match_query.hxx:70
auto field(std::string field_name) -> match_query &
If a field is specified, only terms in that field will be matched.
Definition match_query.hxx:109
auto encode() const -> encoded_search_query override
auto fuzziness(std::uint32_t fuzziness) -> match_query &
Perform fuzzy matching.
Definition match_query.hxx:126
auto analyzer(std::string analyzer_name) -> match_query &
Analyzers are used to transform input text into a stream of tokens for indexing.
Definition match_query.hxx:91
auto match_operator(couchbase::match_operator concatenation_operator) -> match_query &
Defines how the individual match terms should be logically concatenated.
Definition match_query.hxx:142
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
match_operator
Defines how the individual match terms should be logically concatenated.
Definition match_operator.hxx:28