![]() |
Mangrove
The C++ Object Document Mapper for MongoDB
|
Represents a query that performs a text search with the $text operator. More...
#include <query_builder.hpp>
Public Member Functions | |
text_search_expr (const char *search, bsoncxx::stdx::optional< const char * > language=bsoncxx::stdx::nullopt, bsoncxx::stdx::optional< bool > case_sensitive=bsoncxx::stdx::nullopt, bsoncxx::stdx::optional< bool > diacritic_sensitive=bsoncxx::stdx::nullopt) | |
Creates a text search expression. More... | |
void | append_to_bson (bsoncxx::builder::core &builder, bool wrap=false) const |
Appends this expression to a BSON core builder, as a key-value pair of the form " key: { $mod: [ divisor, remainder ] } ". More... | |
operator bsoncxx::document::view_or_value () const | |
Converts the expression to a BSON filter for a query. More... | |
Represents a query that performs a text search with the $text operator.
TODO check values of language
against spec?
|
inline |
Creates a text search expression.
These parameters correspond to the parameters for the $text operator in MongoDB.
search | A string of terms use to query the text index. |
language | The language of the text index. |
case_sensitive | A boolean flag to specify case-sensitive search. Optional, false by default. |
diacritic_sensitive | A boolean flag to specify case-sensitive search. Optional, false by default. |
|
inline |
Appends this expression to a BSON core builder, as a key-value pair of the form " key: { $mod: [ divisor, remainder ] } ".
builder | a BSON core builder |
wrap | Whether to wrap the BSON inside a document. |
|
inline |
Converts the expression to a BSON filter for a query.
The resulting BSON is of the form "{ key: { $mod: [ divisor, remainder ] } }".