command_classes.php
public function setQuery($value)
    {
        if (is_array($value)) {
            $this->setParam('query', CPS_QueryArray($value));
        } else {
            $this->setParam('query', $value);
        }
    }
public function setQuery($value)
    {
        if (is_array($value)) {
            $this->setParam('query', CPS_QueryArray($value));
        } else {
            $this->setParam('query', $value);
        }
    }
public function setQuery ( $ value ) { if ( is_array ( $ value ) ) { $ this -> setParam ( 'query' , CPS_QueryArray ( $ value ) ) ; } else { $ this -> setParam ( 'query' , $ value ) ; } }
Sets the search query.

Example usage:
<code>$r->setQuery('(' . CPS_Term('predefined_term', '/generated_fields/type/') . CPS_QueryTerm($user_supplied_terms, '/searchable_fields/text') . ')');</code>
or
<code>$r->setQuery(array('tags' => array('title' => 'Title', 'text' => 'Text')));</code>
or
<code>$r->setQuery(array('tags/title' => 'Title', 'tags/text' => 'Text'));</code>
@param array|string $value The query array/string.
If the string form is used, all <, > and & characters that aren't supposed to be XML tags, should be escaped (e.g. with {@link CPS_Term} or {@link CPS_QueryTerm});
@see CPS_QueryTerm, CPS_Term
Sets the search query .