class SearchSort (View source)

Base class for all FTS sort options in querying.

Methods

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.

geoDistance(string $field, float $longitude, float $latitude)

Sort by geo location.

Details

static SearchSortId id()

Sort by the document identifier.

Return Value

SearchSortId

static SearchSortScore score()

Sort by the hit score.

Return Value

SearchSortScore

static SearchSortField field(string $field)

Sort by a field in the hits.

Parameters

string $field

the field name

Return Value

SearchSortField

static SearchSortGeoDistance geoDistance(string $field, float $longitude, float $latitude)

Sort by geo location.

Parameters

string $field

the field name

float $longitude

the longitude of the location

float $latitude

the latitude of the location

Return Value

SearchSortGeoDistance