redirect ( Url::to(['search/index#Site'])); $config = SOLRQueryManager::getConfigWebsites (); // create a client instance $client = new Solarium\Client ( $config ); // set the adapter to http $client->setAdapter ( 'Solarium\Core\Client\Adapter\Http' ); // get a select query instance $query = $client->createSelect (); // set fields to fetch (this overrides the default setting 'all fields') $q = "content:".$content; $query->setQuery ( $q ); // this executes the query and returns the result $raw_response = $client->select ( $query ); $urls=[]; foreach ( $raw_response as $doc) { $urls[]=$doc->url; } return $this->render ( 'webView', [ "model" => $model, "searchedFor" => $content, "urls" => $urls ] ); } }