\CouchbaseSearchSortField

Sort by a field in the hits.

Summary

Methods
Properties
Constants
id()
score()
field()
geoDistance()
descending()
type()
mode()
missing()
No public properties found
TYPE_AUTO
TYPE_STRING
TYPE_NUMBER
TYPE_DATE
MODE_DEFAULT
MODE_MIN
MODE_MAX
MISSING_FIRST
MISSING_LAST
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

TYPE_AUTO

TYPE_AUTO

TYPE_STRING

TYPE_STRING

TYPE_NUMBER

TYPE_NUMBER

TYPE_DATE

TYPE_DATE

MODE_DEFAULT

MODE_DEFAULT

MODE_MIN

MODE_MIN

MODE_MAX

MODE_MAX

MISSING_FIRST

MISSING_FIRST

MISSING_LAST

MISSING_LAST

Methods

field()

field(string  $field) : \Couchbase\SearchSortField

Sort by a field in the hits.

Parameters

string $field

the field name

Returns

\Couchbase\SearchSortField

geoDistance()

geoDistance(string  $field, float  $longitude, float  $latitude) : \Couchbase\SearchSortGeoDistance

Sort by geo location.

Parameters

string $field

the field name

float $longitude

the longitude of the location

float $latitude

the latitude of the location

Returns

\Couchbase\SearchSortGeoDistance

descending()

descending(boolean  $descending) : \Couchbase\SearchSortField

Direction of the sort

Parameters

boolean $descending

Returns

\Couchbase\SearchSortField

mode()

mode(  $mode) 

Set mode of the sort

Parameters

$mode

missing()

missing(  $missing) 

Set where the hits with missing field will be inserted

Parameters

$missing