SearchSortField
class SearchSortField extends SearchSort implements JsonSerializable (View source)
Sort by a field in the hits.
Constants
TYPE_AUTO |
|
TYPE_STRING |
|
TYPE_NUMBER |
|
TYPE_DATE |
|
MODE_DEFAULT |
|
MODE_MIN |
|
MODE_MAX |
|
MISSING_FIRST |
|
MISSING_LAST |
|
Methods
static SearchSortGeoDistance
geoDistance(string $field, float $longitude, float $latitude)
Sort by geo location.
from
SearchSort
descending(bool $descending)
Direction of the sort
type(string $type)
Set type of the field
mode(string $mode)
Set mode of the sort
missing(string $missing)
Set where the hits with missing field will be inserted
Details
static SearchSortId
id()
Sort by the document identifier.
static SearchSortScore
score()
Sort by the hit score.
static SearchSortField
field(string $field)
Sort by a field in the hits.
static SearchSortGeoDistance
geoDistance(string $field, float $longitude, float $latitude)
Sort by geo location.
SearchSortField
descending(bool $descending)
Direction of the sort
type(string $type)
Set type of the field
mode(string $mode)
Set mode of the sort
missing(string $missing)
Set where the hits with missing field will be inserted