setAdapter('Solarium_Client_Adapter_ZendHttp'); $zendHttp = $client->getAdapter()->getZendHttp(); // you can use any of the zend_http features, like http-authentication $zendHttp->setAuth('user', 'password!', Zend_Http_Client::AUTH_BASIC); // get a select query instance $query = $client->createSelect(); // this executes the query and returns the result $resultset = $client->select($query); // display the total number of documents found by solr echo 'NumFound: '.$resultset->getNumFound(); // show documents using the resultset iterator foreach ($resultset as $document) { echo '
' . $field . ' | ' . $value . ' |
---|