You are here

public function SolrBaseQuery::addParams in Apache Solr Search 6.3

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

Adds multiple params to be sent when running the Solr search.

If the param is single-valued, this will replace rather than add the value.

Parameters

$params: An array where the keys are param names, and the values may be strings or arrays of strings.

Return value

DrupalSolrQueryInterface The called object.

Overrides DrupalSolrQueryInterface::addParams

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

File

./Solr_Base_Query.php, line 512
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 addParams(array $params) {
  foreach ($params as $name => $value) {
    $this
      ->addParam($name, $value);
  }
  return $this;
}