phpday 2027 - Call for Papers

The SolrResponse class

(PECL solr >= 0.9.2)

Introduction

Represents a response from the Solr server.

Class synopsis

abstract class SolrResponse {
/* Constants */
const int PARSE_SOLR_OBJ = 0;
const int PARSE_SOLR_DOC = 1;
/* Properties */
protected int $http_status;
protected int $parser_mode;
protected bool $success;
/* Methods */
public function getDigestedResponse(): string
public function getHttpStatus(): int
public function getHttpStatusMessage(): string
public function getRawRequest(): string
public function getRawRequestHeaders(): string
public function getRawResponse(): string
public function getRawResponseHeaders(): string
public function getRequestUrl(): string
public function getResponse(): SolrObject
public function setParseMode(int $parser_mode = 0): bool
public function success(): bool
}

Properties

http_status

The http status of the response.

parser_mode

Whether to parse the solr documents as SolrObject or SolrDocument instances.

success

Was there an error during the request

http_status_message

Detailed message on http status

http_request_url

The request URL

http_raw_request_headers

A string of raw headers sent during the request.

http_raw_request

The raw request sent to the server

http_raw_response_headers

Response headers from the Solr server.

http_raw_response

The response message from the server.

http_digested_response

The response in PHP serialized format.

Predefined Constants

SolrResponse Class Constants

SolrResponse::PARSE_SOLR_OBJ

Documents should be parsed as SolrObject instances

SolrResponse::PARSE_SOLR_DOC

Documents should be parsed as SolrDocument instances.

Table of Contents

User Contributed Notes

There are no user contributed notes for this page.
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top