You are here

protected function Apache_Solr_Service::_sendRawGet in Apache Solr Search 5

Central method for making a get operation against this Solr Server

@todo implement timeout ability

Parameters

string $url:

float $timeout Read timeout in seconds:

Return value

Apache_Solr_Response

Throws

Exception If a non 200 response status is returned

2 calls to Apache_Solr_Service::_sendRawGet()
Apache_Solr_Service::search in SolrPhpClient/Apache/Solr/Service.php
Simple Search interface
Apache_Solr_Service::threads in SolrPhpClient/Apache/Solr/Service.php
Call the /admin/threads servlet and retrieve information about all threads in the Solr servlet's thread group. Useful for diagnostics.

File

SolrPhpClient/Apache/Solr/Service.php, line 270

Class

Apache_Solr_Service
Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.

Code

protected function _sendRawGet($url, $timeout = FALSE) {

  //$http_response_header is set by file_get_contents
  $http_response_header = NULL;
  $response = new Apache_Solr_Response(@file_get_contents($url), $http_response_header, $this->_createDocuments, $this->_collapseSingleValueArrays);
  if ($response
    ->getHttpStatus() != 200) {
    throw new Exception('"' . $response
      ->getHttpStatus() . '" Status: ' . $response
      ->getHttpStatusMessage(), $response
      ->getHttpStatus());
  }
  return $response;
}