Sorts by a field in the hits.
More...
#include <couchbase/search_sort_field.hxx>
◆ search_sort_field() [1/2]
◆ search_sort_field() [2/2]
◆ descending()
Set the sorting direction.
- Parameters
-
desc | true for descending order, false for ascending |
- Returns
- pointer to this
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ encode()
auto encode |
( |
| ) |
const -> encoded_search_sort |
|
nodiscardoverridevirtual |
- Returns
- encoded representation of the search facet.
- Since
- 1.0.0
- Internal
- Internal interface
Implements search_sort.
◆ missing()
Specifies the sort-procedure for documents with a missing value in a field specified for sorting.
The value of missing can be search_sort_field_missing::first, in which case results with missing values appear before other results; or search_sort_field_missing::last (the server default), in which case they appear after.
- Parameters
-
value | strategy for missing values |
- Returns
- pointer to this
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ mode()
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 search_sort_field_mode::min or search_sort_field_mode::max.
- Parameters
-
value | strategy for multi-value fields. |
- Returns
- pointer to this
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ type()
The documentation for this class was generated from the following file: