public function Solr_Base_Query::set_solrsort in Apache Solr Search 6.2
Same name and namespace in other branches
- 5.2 Solr_Base_Query.php \Solr_Base_Query::set_solrsort()
- 6 Solr_Base_Query.php \Solr_Base_Query::set_solrsort()
Set the solrsort.
Parameters
$field: The name of a field in the solr index that's an allowed sort.
$direction: 'asc' or 'desc'
Overrides Drupal_Solr_Query_Interface::set_solrsort
1 call to Solr_Base_Query::set_solrsort()
File
- ./
Solr_Base_Query.php, line 317
Class
Code
public function set_solrsort($name, $direction) {
if (isset($this->available_sorts[$name])) {
$this->solrsort = array(
'#name' => $name,
'#direction' => $direction,
);
}
}