PHP Trait ElasticSearcher\Fragments\Traits\SortableTrait

See also: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html
Show file Open project: madewithlove/elasticsearcher

Public Methods

Method Description
sort ( array $fields )
sortBy ( string $fieldName, string | null $direction = null )

Private Methods

Method Description
findField ( string $fieldName, array | null $fields )

Method Details

sort() public method

public sort ( array $fields )
$fields array

sortBy() public method

public sortBy ( string $fieldName, string | null $direction = null )
$fieldName string
$direction string | null