You are here

protected function Solr_Base_Query::default_sorts in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6 Solr_Base_Query.php \Solr_Base_Query::default_sorts()
  2. 6.2 Solr_Base_Query.php \Solr_Base_Query::default_sorts()

Returns a default list of sorts.

1 call to Solr_Base_Query::default_sorts()
Solr_Base_Query::__construct in ./Solr_Base_Query.php

File

./Solr_Base_Query.php, line 313

Class

Solr_Base_Query

Code

protected function default_sorts() {

  // The array keys must always be real Solr index fields.
  return array(
    'score' => array(
      'title' => t('Relevancy'),
      'default' => 'asc',
    ),
    'sort_title' => array(
      'title' => t('Title'),
      'default' => 'asc',
    ),
    'type' => array(
      'title' => t('Type'),
      'default' => 'asc',
    ),
    'sort_name' => array(
      'title' => t('Author'),
      'default' => 'asc',
    ),
    'created' => array(
      'title' => t('Date'),
      'default' => 'desc',
    ),
  );
}