class SearchSortField implements JsonSerializable, SearchSort (View source)

Sort by a field in the hits.

Methods

mixed
jsonSerialize()

Specify data which should be serialized to JSON

__construct(string $field)

No description

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

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)

No description

Parameters

string $field

SearchSortField descending(bool $descending)

Direction of the sort

Parameters

bool $descending

Return Value

SearchSortField

SearchSortField type(string $type)

Set type of the field

Parameters

string $type

Return Value

SearchSortField

See also

SearchSortType::AUTO
SearchSortType::STRING
SearchSortType::NUMBER
SearchSortType::DATE

SearchSortField mode(string $mode)

Set mode of the sort

Parameters

string $mode

Return Value

SearchSortField

See also

SearchSortMode::MIN
SearchSortMode::MAX

SearchSortField missing(string $missing)

Set where the hits with missing field will be inserted

Parameters

string $missing

Return Value

SearchSortField

See also

SearchSortMissing::FIRST
SearchSortMissing::LAST