Commit 09379e1e authored by Josh Turmel's avatar Josh Turmel

Add ability to remove q param from Select request

* Some Solr configurations have complex queries
  defined in solrconfig.xml with custom parameters,
  because of this, you might not always want the
  'q' parameter sent, this patch allows you to set
  'query' to NULL so that when you do it prevents
  'q' from being sent at all.
parent 5c7afe1c
...@@ -272,8 +272,12 @@ class Solarium_Query_Select extends Solarium_Query ...@@ -272,8 +272,12 @@ class Solarium_Query_Select extends Solarium_Query
if (!is_null($bind)) { if (!is_null($bind)) {
$query = $this->getHelper()->assemble($query, $bind); $query = $this->getHelper()->assemble($query, $bind);
} }
if (!is_null($query)) {
$query = trim($query);
}
return $this->_setOption('query', trim($query)); return $this->_setOption('query', $query);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment