Couchbase C++ SDK 1.0.4 (rev. 5355b0f)
Loading...
Searching...
No Matches
search_query Class Referenceabstract

Base class for full text search queries. More...

#include <couchbase/search_query.hxx>

Inheritance diagram for search_query:
Inheritance graph

Public Member Functions

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).
 
virtual auto encode () const -> encoded_search_query=0
 

Protected Member Functions

 search_query ()=default
 

Protected Attributes

std::optional< double > boost_ {}
 

Detailed Description

Base class for full text search queries.

Constructor & Destructor Documentation

◆ ~search_query()

virtual ~search_query ( )
virtualdefault

◆ search_query()

search_query ( )
protecteddefault

Member Function Documentation

◆ boost()

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&
inline

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).

Parameters
boostboost value
Template Parameters
derived_queryby default it returns this as search_query, but it can also down-cast to derived query class.
Returns
this query for chaining purposes.
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ encode()

Member Data Documentation

◆ boost_

std::optional<double> boost_ {}
protected

The documentation for this class was generated from the following file: