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 first, in which case results with missing values appear before other results; or 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 min or 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()
Specifies the type of the search-order field value.
For example, string for text fields, date for DateTime fields, or number for numeric/geo fields.
- Parameters
-
- Returns
- pointer to this
- 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: