|
Couchbase C++ SDK 1.4.0 (rev. 59aa900)
|
Sorts by a field in the hits. More...
#include <couchbase/search_sort_field.hxx>

Public Member Functions | |
| search_sort_field (std::string field) | |
| search_sort_field (std::string field, bool descending) | |
| auto | descending (bool desc) -> search_sort_field & |
| Set the sorting direction. | |
| auto | type (search_sort_field_type value) -> search_sort_field & |
| Specifies the type of the search-order field value. | |
| auto | mode (search_sort_field_mode value) -> search_sort_field & |
| Specifies the search-order for index-fields that contain multiple values (in consequence of arrays or multi-token analyzer-output). | |
| auto | missing (search_sort_field_missing value) -> search_sort_field & |
| Specifies the sort-procedure for documents with a missing value in a field specified for sorting. | |
| auto | encode () const -> encoded_search_sort override |
| Public Member Functions inherited from search_sort | |
| virtual | ~search_sort ()=default |
Additional Inherited Members | |
| Protected Member Functions inherited from search_sort | |
| search_sort ()=default | |
| search_sort (bool descending) | |
| Protected Attributes inherited from search_sort | |
| std::optional< bool > | descending_ {} |
Sorts by a field in the hits.
|
inlineexplicit |
|
inline |
| auto descending | ( | bool | desc | ) | -> search_sort_field & |
Set the sorting direction.
| desc | true for descending order, false for ascending |
|
nodiscardoverridevirtual |
Implements search_sort.
| auto missing | ( | search_sort_field_missing | value | ) | -> search_sort_field & |
Specifies the sort-procedure for documents with a missing value in a field specified for sorting.
The value of missing can be first, in which case results with missing values appear before other results; or last (the server default), in which case they appear after.
| value | strategy for missing values |
| auto mode | ( | search_sort_field_mode | value | ) | -> search_sort_field & |
Specifies the search-order for index-fields that contain multiple values (in consequence of arrays or multi-token analyzer-output).
The default order is undefined but deterministic, allowing the paging of results, with reliable ordering. To sort using the minimum or maximum value, the value of mode should be set to either min or max.
| value | strategy for multi-value fields. |
| auto type | ( | search_sort_field_type | value | ) | -> search_sort_field & |