The SolrClient class
(PECL solr >= 0.9.2)
Introduction
Used to send requests to a Solr server. Currently, cloning and serialization of SolrClient instances is not supported.
Class synopsis
final class SolrClient {
/* Constants */
/* Methods */
public addDocument(SolrInputDocument
$doc, bool $overwrite = true, int $commitWithin = 0): SolrUpdateResponsepublic commit(bool
$softCommit = false, bool $waitSearcher = true, bool $expungeDeletes = false): SolrUpdateResponsepublic optimize(int
$maxSegments = 1, bool $softCommit = true, bool $waitSearcher = true): SolrUpdateResponsepublic __destruct()
}Predefined Constants
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
Table of Contents
- SolrClient::addDocument — Adds a document to the index
- SolrClient::addDocuments — Adds a collection of SolrInputDocument instances to the index
- SolrClient::commit — Finalizes all add/deletes made to the index
- SolrClient::__construct — Constructor for the SolrClient object
- SolrClient::deleteById — Delete by Id
- SolrClient::deleteByIds — Deletes by Ids
- SolrClient::deleteByQueries — Removes all documents matching any of the queries
- SolrClient::deleteByQuery — Deletes all documents matching the given query
- SolrClient::__destruct — Destructor for SolrClient
- SolrClient::getById — Get Document By Id. Utilizes Solr Realtime Get (RTG)
- SolrClient::getByIds — Get Documents by their Ids. Utilizes Solr Realtime Get (RTG)
- SolrClient::getDebug — Returns the debug data for the last connection attempt
- SolrClient::getOptions — Returns the client options set internally
- SolrClient::optimize — Defragments the index
- SolrClient::ping — Checks if Solr server is still up
- SolrClient::query — Sends a query to the server
- SolrClient::request — Sends a raw update request
- SolrClient::rollback — Rollbacks all add/deletes made to the index since the last commit
- SolrClient::setResponseWriter — Sets the response writer used to prepare the response from Solr
- SolrClient::setServlet — Changes the specified servlet type to a new value
- SolrClient::system — Retrieve Solr Server information
- SolrClient::threads — Checks the threads status
↑ and ↓ to navigate • Enter to select • Esc to close • / to open