original_string: 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;
  	}
code: 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;
  	}
code_tokens: 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 ; }
docstring: Add one level of sorting
  @return OpenSearchServer\Search\Search
docstring_tokens: Add one level of sorting