PHP 8.1.31 Released!

The SolrClient class

(PECL solr >= 0.9.2)

简介

Used to send requests to a Solr server. Currently, cloning and serialization of SolrClient instances is not supported.

类摘要

final class SolrClient {
/* 常量 */
const string DEFAULT_THREADS_SERVLET = admin/threads;
const string DEFAULT_PING_SERVLET = admin/ping;
const string DEFAULT_SYSTEM_SERVLET = admin/system;
/* 方法 */
public __construct(array $clientOptions)
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 getDebug(): string
public getOptions(): array
public optimize(int $maxSegments = 1, bool $softCommit = true, bool $waitSearcher = true): SolrUpdateResponse
public request(string $raw_request): SolrUpdateResponse
public setResponseWriter(string $responseWriter): void
public setServlet(int $type, string $value): bool
public system(): void
public threads(): void
public __destruct()
}

预定义常量

SolrClient::SEARCH_SERVLET_TYPE

Used when updating the search servlet.

SolrClient::UPDATE_SERVLET_TYPE

Used when updating the update servlet.

SolrClient::THREADS_SERVLET_TYPE

Used when updating the threads servlet.

SolrClient::PING_SERVLET_TYPE

Used when updating the ping servlet.

SolrClient::TERMS_SERVLET_TYPE

Used when updating the terms servlet.

SolrClient::SYSTEM_SERVLET_TYPE

Used when retrieving system information from the system servlet.

SolrClient::DEFAULT_SEARCH_SERVLET

This is the initial value for the search servlet.

SolrClient::DEFAULT_UPDATE_SERVLET

This is the initial value for the update servlet.

SolrClient::DEFAULT_THREADS_SERVLET

This is the initial value for the threads servlet.

SolrClient::DEFAULT_PING_SERVLET

This is the initial value for the ping servlet.

SolrClient::DEFAULT_TERMS_SERVLET

This is the initial value for the terms servlet used for the TermsComponent

SolrClient::DEFAULT_SYSTEM_SERVLET

This is the initial value for the system servlet used to obtain Solr Server information

目录

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top