You are here

public function SolrBaseQuery::removeParam in Apache Solr Search 8

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

Removes all values for one Solr param.

Parameters

string $name: A Solr param name, e.g. 'q' or 'fl'.

Return value

DrupalSolrQueryInterface The called object.

Overrides DrupalSolrQueryInterface::removeParam

1 call to SolrBaseQuery::removeParam()
SolrBaseQuery::replaceParam in ./Solr_Base_Query.php
Replaces a param to be sent when running the Solr search.

File

./Solr_Base_Query.php, line 517
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 removeParam($name) {
  unset($this->params[$name]);
  if ($name == 'fq') {
    $this->fields = array();
    $this->subqueries = array();
  }
  return $this;
}