public function Solr_Base_Query::get_url_queryvalues in Apache Solr Search 6
Same name and namespace in other branches
- 5.2 Solr_Base_Query.php \Solr_Base_Query::get_url_queryvalues()
- 6.2 Solr_Base_Query.php \Solr_Base_Query::get_url_queryvalues()
Return filters and sort in a form suitable for a query param to url().
Overrides Drupal_Solr_Query_Interface::get_url_queryvalues
File
- ./
Solr_Base_Query.php, line 338
Class
Code
public function get_url_queryvalues() {
$queryvalues = array();
if ($fq = $this
->rebuild_fq(TRUE)) {
$queryvalues['filters'] = implode(' ', $fq);
}
$solrsort = $this->solrsort;
if ($solrsort && ($solrsort['#name'] != 'score' || $solrsort['#direction'] != 'asc')) {
if (isset($this->field_map[$solrsort['#name']])) {
$solrsort['#name'] = $this->field_map[$solrsort['#name']];
}
$queryvalues['solrsort'] = $solrsort['#name'] . ' ' . $solrsort['#direction'];
}
return $queryvalues;
}