You are here

public function SolrBaseQuery::getPath in Apache Solr Search 6.3

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

Returns the search path (including the search keywords).

Parameters

string $new_keywords: Optional. When set, this string overrides the query's current keywords.

Return value

string The search path.

Overrides DrupalSolrQueryInterface::getPath

File

./Solr_Base_Query.php, line 617
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 getPath($new_keywords = NULL) {
  if (isset($new_keywords)) {
    return $this->base_path . '/' . $new_keywords;
  }
  elseif ($this
    ->getParam('q')) {
    return $this->base_path . '/' . $this
      ->getParam('q');
  }
  else {
    return $this->base_path;
  }
}