abstract class SolrResponse (View source)

(PECL solr >= 0.9.2)
Class SolrResponse
This class represents a response from the Solr server.

Constants

PARSE_SOLR_OBJ

PARSE_SOLR_DOC

Properties

protected int $http_status
protected int $parser_mode
protected bool $success
protected string $http_status_message
protected string $http_request_url
protected string $http_raw_request_headers
protected string $http_raw_request
protected string $http_raw_response_headers
protected string $http_raw_response
protected string $http_digested_response

Methods

string
getDigestedResponse()

(PECL solr >= 0.9.2)
Returns the XML response as serialized PHP data

int
getHttpStatus()

(PECL solr >= 0.9.2)
Returns the HTTP status of the response

string
getHttpStatusMessage()

(PECL solr >= 0.9.2)
Returns more details on the HTTP status

string
getRawRequest()

(PECL solr >= 0.9.2)
Returns the raw request sent to the Solr server

string
getRawRequestHeaders()

(PECL solr >= 0.9.2)
Returns the raw request headers sent to the Solr server

string
getRawResponse()

(PECL solr >= 0.9.2)
Returns the raw response from the server

string
getRawResponseHeaders()

(PECL solr >= 0.9.2)
Returns the raw response headers from the server

string
getRequestUrl()

(PECL solr >= 0.9.2)
Returns the full URL the request was sent to

getResponse()

(PECL solr >= 0.9.2)
Returns a SolrObject representing the XML response from the server

bool
setParseMode(int $parser_mode = 0)

(PECL solr >= 0.9.2)
Sets the parse mode

bool
success()

(PECL solr >= 0.9.2)
Was the request a success

Details

string getDigestedResponse()

(PECL solr >= 0.9.2)
Returns the XML response as serialized PHP data

Return Value

string

Returns the XML response as serialized PHP data

int getHttpStatus()

(PECL solr >= 0.9.2)
Returns the HTTP status of the response

Return Value

int

Returns the HTTP status of the response.

string getHttpStatusMessage()

(PECL solr >= 0.9.2)
Returns more details on the HTTP status

Return Value

string

Returns more details on the HTTP status

string getRawRequest()

(PECL solr >= 0.9.2)
Returns the raw request sent to the Solr server

Return Value

string

Returns the raw request sent to the Solr server

string getRawRequestHeaders()

(PECL solr >= 0.9.2)
Returns the raw request headers sent to the Solr server

Return Value

string

Returns the raw request headers sent to the Solr server

string getRawResponse()

(PECL solr >= 0.9.2)
Returns the raw response from the server

Return Value

string

Returns the raw response from the server.

string getRawResponseHeaders()

(PECL solr >= 0.9.2)
Returns the raw response headers from the server

Return Value

string

Returns the raw response headers from the server.

string getRequestUrl()

(PECL solr >= 0.9.2)
Returns the full URL the request was sent to

Return Value

string

Returns the full URL the request was sent to

SolrObject getResponse()

(PECL solr >= 0.9.2)
Returns a SolrObject representing the XML response from the server

Return Value

SolrObject

Returns a SolrObject representing the XML response from the server

bool setParseMode(int $parser_mode = 0)

(PECL solr >= 0.9.2)
Sets the parse mode

Parameters

int $parser_mode
  • SolrResponse::PARSE_SOLR_DOC parses documents in SolrDocument instances.
  • SolrResponse::PARSE_SOLR_OBJ parses document into SolrObjects.

Return Value

bool

Returns TRUE on success or FALSE on failure.

bool success()

(PECL solr >= 0.9.2)
Was the request a success

Return Value

bool

Returns TRUE if it was successful and FALSE if it was not.