You are here

public function apachesolr_views_query::add_sort in Apache Solr Views 6

Same name and namespace in other branches
  1. 7 apachesolr_views_query.inc \apachesolr_views_query::add_sort()

Add a sorting directive.

Parameters

$single If TRUE, the results will only be sorted by this order.:

1 call to apachesolr_views_query::add_sort()
apachesolr_views_query::set_solrsort in ./apachesolr_views_query.inc
set the solrsort. This currently doesn't work

File

./apachesolr_views_query.inc, line 474

Class

apachesolr_views_query
Class for handling a view that gets its data not from the database, but from a Solr server.

Code

public function add_sort($field, $order, $single = FALSE) {
  if ($single) {
    $this->_sorts = array();
  }

  // don't need drupal_strtolower, this isn't a UTF-8 string
  $this->_sorts[$field] = strtolower($order);
}