SearchSortGeoDistance
in package
implements
JsonSerializable, SearchSort
Sort by a location and unit in the hits.
Interfaces, Classes, Traits and Enums
- JsonSerializable
- SearchSort
- Base interface for all FTS sort options in querying.
Table of Contents
- $descending : bool|null
- $field : string
- $latitude : float
- $longitude : float
- $unit : string|null
- __construct() : mixed
- descending() : SearchSortGeoDistance
- Direction of the sort
- unit() : SearchSortGeoDistance
- Name of the units
Properties
$descending
private
bool|null
$descending
= null
$field
private
string
$field
$latitude
private
float
$latitude
$longitude
private
float
$longitude
$unit
private
string|null
$unit
= null
Methods
__construct()
public
__construct(string $field, float $longitude, float $latitude) : mixed
Parameters
- $field : string
- $longitude : float
- $latitude : float
Return values
mixed —descending()
Direction of the sort
public
descending(bool $descending) : SearchSortGeoDistance
Parameters
- $descending : bool
Tags
Return values
SearchSortGeoDistance —unit()
Name of the units
public
unit(string $unit) : SearchSortGeoDistance
Parameters
- $unit : string