Couchbase C++ SDK 1.0.1 (rev. 58d46d7)
Loading...
Searching...
No Matches
boolean_field_query Class Reference

Allow to match true/false in a field mapped as boolean. More...

#include <couchbase/boolean_field_query.hxx>

Inheritance diagram for boolean_field_query:
Inheritance graph

Public Member Functions

 boolean_field_query (bool value)
 Create a new boolean field query.
 
auto field (std::string field_name) -> boolean_field_query &
 If a field is specified, only terms in that field will be matched.
 
auto encode () const -> encoded_search_query override
 
- Public Member Functions inherited from search_query
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).
 

Additional Inherited Members

- Protected Member Functions inherited from search_query
 search_query ()=default
 
- Protected Attributes inherited from search_query
std::optional< double > boost_ {}
 

Detailed Description

Allow to match true/false in a field mapped as boolean.

Since
1.0.0
Committed
Generally available API and should be preferred in production

Constructor & Destructor Documentation

◆ boolean_field_query()

boolean_field_query ( bool value)
inlineexplicit

Create a new boolean field query.

Parameters
valuethe input string to be matched against
Since
1.0.0
Committed
Generally available API and should be preferred in production

Member Function Documentation

◆ encode()

auto encode ( ) const -> encoded_search_query
overridevirtual
Returns
encoded representation of the query.
Since
1.0.0
Internal
Internal interface

Implements search_query.

◆ field()

auto field ( std::string field_name) -> boolean_field_query&
inline

If a field is specified, only terms in that field will be matched.

Parameters
field_namename of the field to be matched
Returns
this query for chaining purposes.
Since
1.0.0
Committed
Generally available API and should be preferred in production

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