You are here

public function SolrBaseQuery::setAvailableSorts in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 Solr_Base_Query.php \SolrBaseQuery::setAvailableSorts()
  2. 7 Solr_Base_Query.php \SolrBaseQuery::setAvailableSorts()

File

./Solr_Base_Query.php, line 591
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

public function setAvailableSorts($sorts) {

  // We expect a complete array of valid sorts.
  $this->available_sorts = $sorts;
  $this
    ->parseSortString();
  return $this;
}