public function sort($field, $direction = self::SORT_DESC) {
		if(empty($this->data['sorts'])) {
			$this->data['sorts'] = array();
		}
		$this->data['sorts'][] = array(
			'field' => $field,
			'direction' => $direction
		);
		return $this;
	}
public function sort($field, $direction = self::SORT_DESC) {
		if(empty($this->data['sorts'])) {
			$this->data['sorts'] = array();
		}
		$this->data['sorts'][] = array(
			'field' => $field,
			'direction' => $direction
		);
		return $this;
	}
public function sort ( $ field , $ direction = self :: SORT_DESC ) { if ( empty ( $ this -> data [ 'sorts' ] ) ) { $ this -> data [ 'sorts' ] = array ( ) ; } $ this -> data [ 'sorts' ] [ ] = array ( 'field' => $ field , 'direction' => $ direction ) ; return $ this ; }
Add one level of sorting
@return OpenSearchServer\Search\Search
Add one level of sorting