You are here

protected function SolrBaseQuery::defaultSorts in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 Solr_Base_Query.php \SolrBaseQuery::defaultSorts()
  2. 6.3 Solr_Base_Query.php \SolrBaseQuery::defaultSorts()
1 call to SolrBaseQuery::defaultSorts()
SolrBaseQuery::__construct in ./Solr_Base_Query.php

File

./Solr_Base_Query.php, line 322
This class allows you to make operations on a query that will be sent to Apache Solr. methods such as adding and removing sorts, remove and replace parameters, adding and removing filters, getters and setters for various parameters and more

Class

SolrBaseQuery

Code

protected function defaultSorts() {
  return array(
    'score' => array(
      'title' => t('Relevancy'),
      'default' => 'desc',
    ),
    'sort_label' => array(
      'title' => t('Title'),
      'default' => 'asc',
    ),
    'bundle' => array(
      'title' => t('Type'),
      'default' => 'asc',
    ),
    'sort_name' => array(
      'title' => t('Author'),
      'default' => 'asc',
    ),
    'ds_created' => array(
      'title' => t('Date'),
      'default' => 'desc',
    ),
  );
}