You are here

public function apachesolr_views_handler_sort::query in Apache Solr Views 7

Same name and namespace in other branches
  1. 6 handlers/apachesolr_views_handler_sort.inc \apachesolr_views_handler_sort::query()

Places the sort into the search parameters.

Overrides views_handler_sort::query

File

handlers/apachesolr_views_handler_sort.inc, line 13
Sort handler for Apache Solr Views.

Class

apachesolr_views_handler_sort
@file Sort handler for Apache Solr Views.

Code

public function query() {

  // Find out why apachesolr module adds sort_* fields
  // to index and use them if needed.
  $order = strtolower($this->options['order']);
  $this->query
    ->add_sort($this->real_field, $order);
}