The query string query allows humans to describe complex queries using a simple syntax.
More...
#include <couchbase/query_string_query.hxx>
|
| query_string_query (std::string query) |
| Create a new query string query.
|
|
auto | encode () const -> encoded_search_query override |
|
virtual | ~search_query ()=default |
|
template<typename derived_query = search_query, std::enable_if_t< std::is_base_of_v< search_query, derived_query >, bool > = true> |
auto | boost (double boost) -> derived_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).
|
|
The query string query allows humans to describe complex queries using a simple syntax.
- When you specify multiple query-clauses, you can specify the relative importance to a given clause by suffixing it with the
^
operator, followed by a number or by specifying the boost parameter with the number to boost the search. For example perform match_query for pool in both the name and description fields, but documents having the term in the name field score higher.
- You can perform date or numeric range searches by using the
>
, >=
, <
, and <=
operators, followed by a date value in quotes. For example, perform a date_range_query on the created field for values after September 21, 2016. Or, perform a numeric_range_query on the reviews.ratings.Cleanliness
field, for values greater than 4.
- See also
- https://docs.couchbase.com/server/current/fts/fts-query-string-syntax.html definition of query syntax
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ query_string_query()
Create a new query string query.
- Parameters
-
query | the query string to be analyzed and used against |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ encode()
auto encode |
( |
| ) |
const -> encoded_search_query |
|
nodiscardoverridevirtual |
- Returns
- encoded representation of the query.
- Since
- 1.0.0
- Internal
- Internal interface
Implements search_query.
The documentation for this class was generated from the following file: