(PECL solr >= 0.9.2)
Used to send requests to a Solr server. Currently, cloning and serialization of SolrClient instances is not supported.
public addDocument(SolrInputDocument $doc, bool $overwrite = true, int $commitWithin = 0): SolrUpdateResponse
public addDocuments(array $docs, bool $overwrite = true, int $commitWithin = 0): void
public commit(bool $softCommit = false, bool $waitSearcher = true, bool $expungeDeletes = false): SolrUpdateResponse
public deleteById(string $id): SolrUpdateResponse
public deleteByIds(array $ids): SolrUpdateResponse
public deleteByQueries(array $queries): SolrUpdateResponse
public deleteByQuery(string $query): SolrUpdateResponse
public getById(string $id): SolrQueryResponse
public getByIds(array $ids): SolrQueryResponse
public getDebug(): string
public getOptions(): array
public optimize(int $maxSegments = 1, bool $softCommit = true, bool $waitSearcher = true): SolrUpdateResponse
public ping(): SolrPingResponse
public query(SolrParams $query): SolrQueryResponse
public request(string $raw_request): SolrUpdateResponse
public rollback(): SolrUpdateResponse
public setResponseWriter(string $responseWriter): void
public setServlet(int $type, string $value): bool
public system(): void
public threads(): void
SolrClient::SEARCH_SERVLET_TYPEUsed when updating the search servlet.
SolrClient::UPDATE_SERVLET_TYPEUsed when updating the update servlet.
SolrClient::THREADS_SERVLET_TYPEUsed when updating the threads servlet.
SolrClient::PING_SERVLET_TYPEUsed when updating the ping servlet.
SolrClient::TERMS_SERVLET_TYPEUsed when updating the terms servlet.
SolrClient::SYSTEM_SERVLET_TYPEUsed when retrieving system information from the system servlet.
SolrClient::DEFAULT_SEARCH_SERVLETThis is the initial value for the search servlet.
SolrClient::DEFAULT_UPDATE_SERVLETThis is the initial value for the update servlet.
SolrClient::DEFAULT_THREADS_SERVLETThis is the initial value for the threads servlet.
SolrClient::DEFAULT_PING_SERVLETThis is the initial value for the ping servlet.
SolrClient::DEFAULT_TERMS_SERVLETThis is the initial value for the terms servlet used for the TermsComponent
SolrClient::DEFAULT_SYSTEM_SERVLETThis is the initial value for the system servlet used to obtain Solr Server information
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.solrclient.php