Couchbase C++ SDK 1.0.4 (rev. 5355b0f)
Loading...
Searching...
No Matches
search_sort_geo_distance Class Reference

Sorts by location in the hits. More...

#include <couchbase/search_sort_geo_distance.hxx>

Inheritance diagram for search_sort_geo_distance:
Inheritance graph

Public Member Functions

 search_sort_geo_distance (geo_point location, std::string field)
 
 search_sort_geo_distance (double latitude, double longitude, std::string field)
 
auto descending (bool desc) -> search_sort_geo_distance &
 Set the sorting direction.
 
auto unit (search_geo_distance_units unit) -> search_sort_geo_distance &
 Specifies the unit used 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_ {}
 

Detailed Description

Constructor & Destructor Documentation

◆ search_sort_geo_distance() [1/2]

search_sort_geo_distance ( geo_point location,
std::string field )
inline

◆ search_sort_geo_distance() [2/2]

search_sort_geo_distance ( double latitude,
double longitude,
std::string field )
inline

Member Function Documentation

◆ descending()

auto descending ( bool desc) -> search_sort_geo_distance &

Set the sorting direction.

Parameters
desctrue 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.

◆ unit()

Specifies the unit used for sorting.

Parameters
unitthe unit used
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: