public function retrieve($query, $params = array(), $structured = false)
    {
        $this->query = (string)$query;
        $params = array_merge(array(($structured ? 'structuredQuery' : 'q') =>
            $this->query), $this->getParams(), $params);
        $request = new RESTRequest('GET', 'search', $params);

        try {
            $response = $this->client->send($request);
            //print_r($response);
            $results = new SearchResults($response->getBody());
            return $results;
        } catch(Exception $e) {
            echo $e->getMessage() . ' in ' . $e->getFile() .
                ' on line ' . $e->getLine() . PHP_EOL;
        }
    }