createSelect(); // manually create a request for the query $request = $client->createRequest($query); // you can now use the request object for getting an uri (ie. to use in you own code) // or you could modify the request object echo 'Request URI: ' . $request->getUri() . '
'; // you can still execute the request using the client and get a 'raw' response object $response = $client->executeRequest($request); // and finally you can convert the response into a result $result = $client->createResult($query, $response); // display the total number of documents found by solr echo 'NumFound: '.$result->getNumFound(); // show documents using the resultset iterator foreach ($result as $document) { echo '
'; // the documents are also iterable, to get all fields foreach($document AS $field => $value) { // this converts multivalue fields to a comma-separated string if(is_array($value)) $value = implode(', ', $value); echo ''; } echo '
' . $field . '' . $value . '
'; } htmlFooter();