60 : term_{ std::move(term) }
83 throw std::invalid_argument(
"prefix_length must be positive");
86 prefix_length_ = length;
102 field_ = std::move(field_name);
135 operator_ = concatenation_operator;
145 [[nodiscard]]
auto encode() const -> encoded_search_query override;
149 std::optional<std::uint32_t> prefix_length_{};
150 std::optional<std::string> field_{};
151 std::optional<std::uint32_t> fuzziness_{};
152 std::optional<couchbase::match_operator> operator_{};
Base class for full text search queries.
Definition search_query.hxx:33
A query that looks for exact matches of the term in the index (no analyzer, no stemming).
Definition term_query.hxx:43
term_query(std::string term)
Create a new term query.
Definition term_query.hxx:59
auto field(std::string field_name) -> term_query &
If a field is specified, only terms in that field will be matched.
Definition term_query.hxx:100
auto match_operator(couchbase::match_operator concatenation_operator) -> term_query &
Defines how the individual match terms should be logically concatenated.
Definition term_query.hxx:133
auto encode() const -> encoded_search_query override
auto prefix_length(std::uint32_t length) -> term_query &
Require that the term also have the same prefix of the specified length (must be positive).
Definition term_query.hxx:80
auto fuzziness(std::uint32_t fuzziness) -> term_query &
Perform fuzzy matching.
Definition term_query.hxx:117
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