Loading...
Searching...
No Matches
mongocxx::v1::search_indexes::model Class Reference

`#include <mongocxx/v1/search_indexes.hpp>`

## Description

A description of a MongoDB Atlas Search index.

Supported fields include:

- definition
- name
- type

See also
  - Queries and Indexes (MongoDB Manual)

## Public Member Functions

| model (bsoncxx::v1::document::value definition)
| Initialize this search index model with the given "definition".
| model (model &&other) noexcept
| Move constructor.
| model (model const &other)
| Copy construction.
| model (std::string name, bsoncxx::v1::document::value definition)
| Initialize this search index model with the given "name" and "definition".
| ~model ()
| Destroy this object.
bsoncxx::v1::document::view | definition () const
| Return the current "definition" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | name () const
| Return the current "name" field.
model & | operator= (model &&other) noexcept
| Move assignment.
model & | operator= (model const &other)
| Copy assignment.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | type () const
| Return the current "type" field.
model & | type (std::string type)
| Set the "type" field.

## Constructor & Destructor Documentation

## ~model()

mongocxx::v1::search_indexes::model::~model | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## model() [1/4]

mongocxx::v1::search_indexes::model::model | ( | model && | other | ) |

noexcept

Move constructor.

Postconditions:
  - other is in an assign-or-destroy-only state.

## model() [2/4]

mongocxx::v1::search_indexes::model::model | ( | model const & | other | ) |

Copy construction.

## model() [3/4]

mongocxx::v1::search_indexes::model::model | ( | std::string | name,
|  | bsoncxx::v1::document::value | definition )

Initialize this search index model with the given "name" and "definition".

Postconditions:
  - All other supported fields are "unset" or zero-initialized.

## model() [4/4]

mongocxx::v1::search_indexes::model::model | ( | bsoncxx::v1::document::value | definition | ) |

Initialize this search index model with the given "definition".

Postconditions:
  - All other supported fields are "unset" or zero-initialized.

## Member Function Documentation

## definition()

bsoncxx::v1::document::view mongocxx::v1::search_indexes::model::definition | ( |  | ) | const

Return the current "definition" field.

## name()

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::search_indexes::model::name | ( |  | ) | const

Return the current "name" field.

## operator=() [1/2]

model & mongocxx::v1::search_indexes::model::operator= | ( | model && | other | ) |

noexcept

Move assignment.

Postconditions:
  - other is in an assign-or-destroy-only state.

## operator=() [2/2]

model & mongocxx::v1::search_indexes::model::operator= | ( | model const & | other | ) |

Copy assignment.

## type() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::search_indexes::model::type | ( |  | ) | const

Return the current "type" field.

## type() [2/2]

model & mongocxx::v1::search_indexes::model::type | ( | std::string | type | ) |

Set the "type" field.

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

- mongocxx/v1/search_indexes.hpp