class SearchSortGeoDistance implements JsonSerializable, SearchSort (View source)

Sort by a location and unit in the hits.

Methods

mixed
jsonSerialize()

Specify data which should be serialized to JSON

__construct(string $field, float $logitude, float $latitude)

No description

descending(bool $descending)

Direction of the sort

unit(string $unit)

Name of the units

Details

mixed jsonSerialize()

Specify data which should be serialized to JSON

Return Value

mixed

data which can be serialized by json_encode, which is a value of any type other than a resource.

__construct(string $field, float $logitude, float $latitude)

No description

Parameters

string $field
float $logitude
float $latitude

SearchSortGeoDistance descending(bool $descending)

Direction of the sort

Parameters

bool $descending

Return Value

SearchSortGeoDistance

SearchSortGeoDistance unit(string $unit)

Name of the units

Parameters

string $unit

Return Value

SearchSortGeoDistance