You are here

apachesolr_views_handler_sort.inc in Apache Solr Views 7

Same filename and directory in other branches
  1. 6 handlers/apachesolr_views_handler_sort.inc

Sort handler for Apache Solr Views.

File

handlers/apachesolr_views_handler_sort.inc
View source
<?php

/**
 * @file
 * Sort handler for Apache Solr Views.
 */
class apachesolr_views_handler_sort extends views_handler_sort {

  /**
   * Places the sort into the search parameters.
   */
  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);
  }

}

Classes

Namesort descending Description
apachesolr_views_handler_sort @file Sort handler for Apache Solr Views.