You are here

public function SolrBaseQuery::addFieldAliases in Apache Solr Search 6.3

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

Handles aliases for field to make nicer URLs.

Parameters

$field_map: An array keyed with real Solr index field names with the alias as value.

Return value

DrupalSolrQueryInterface The called object.

Overrides DrupalSolrQueryInterface::addFieldAliases

File

./Solr_Base_Query.php, line 542
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 addFieldAliases($field_map) {
  $this->field_map = array_merge($this->field_map, $field_map);

  // We have to re-parse the filters.
  $this
    ->parseSortString();
  return $this;
}