public function query($query, $index = '*', $comment = '')
    {
        assert(empty($this->_reqs));

        $this->AddQuery($query, $index, $comment);
        $results = $this->RunQueries();
        $this->_reqs = array(); // just in case it failed too early

        if (!is_array($results)) {
            return false;
        } // probably network error; error message should be already filled

        $this->_error = $results[0]['error'];
        $this->_warning = $results[0]['warning'];
        if ($results[0]['status'] == SEARCHD_ERROR) {
            return false;
        } else {
            return $results[0];
        }
    }
public function query($query, $index = '*', $comment = '')
    {
        assert(empty($this->_reqs));

        $this->AddQuery($query, $index, $comment);
        $results = $this->RunQueries();
        $this->_reqs = array(); // just in case it failed too early

        if (!is_array($results)) {
            return false;
        } // probably network error; error message should be already filled

        $this->_error = $results[0]['error'];
        $this->_warning = $results[0]['warning'];
        if ($results[0]['status'] == SEARCHD_ERROR) {
            return false;
        } else {
            return $results[0];
        }
    }
public function query ( $ query , $ index = '*' , $ comment = '' ) { assert ( empty ( $ this -> _reqs ) ) ; $ this -> AddQuery ( $ query , $ index , $ comment ) ; $ results = $ this -> RunQueries ( ) ; $ this -> _reqs = array ( ) ; // just in case it failed too early if ( ! is_array ( $ results ) ) { return false ; } // probably network error; error message should be already filled $ this -> _error = $ results [ 0 ] [ 'error' ] ; $ this -> _warning = $ results [ 0 ] [ 'warning' ] ; if ( $ results [ 0 ] [ 'status' ] == SEARCHD_ERROR ) { return false ; } else { return $ results [ 0 ] ; } }
Connects to searchd server, run given search query through given indexes, and returns the search results.

@param $query
@param string $index
@param string $comment

@return bool
Connects to searchd server run given search query through given indexes and returns the search results .