SolrClient
final class SolrClient (View source)
(PECL solr >= 0.9.2)
Class SolrClient
This class is used to send requests to a Solr server. Currently, cloning and serialization of SolrClient instances is
not supported.
Constants
SEARCH_SERVLET_TYPE |
|
UPDATE_SERVLET_TYPE |
|
THREADS_SERVLET_TYPE |
|
PING_SERVLET_TYPE |
|
TERMS_SERVLET_TYPE |
|
SYSTEM_SERVLET_TYPE |
|
DEFAULT_SEARCH_SERVLET |
|
DEFAULT_UPDATE_SERVLET |
|
DEFAULT_THREADS_SERVLET |
|
DEFAULT_PING_SERVLET |
|
DEFAULT_TERMS_SERVLET |
|
DEFAULT_SYSTEM_SERVLET |
|
Methods
(PECL solr >= 0.9.2)
Adds a document to the index
(PECL solr >= 0.9.2)
Adds a collection of SolrInputDocument instances to the index
(PECL solr >= 0.9.2)
Finalizes all add/deletes made to the index
(PECL solr >= 0.9.2)
SolrClient constructor.
(PECL solr >= 0.9.2)
Delete by Id
(PECL solr >= 0.9.2)
Deletes by Ids
(PECL solr >= 0.9.2)
Removes all documents matching any of the queries
(PECL solr >= 0.9.2)
Deletes all documents matching the given query
(PECL solr >= 0.9.2)
Destructor for SolrClient
(PECL solr >= 2.2.0)
Get Document By Id. Utilizes Solr Realtime Get (RTG).
(PECL solr >= 2.2.0)
Get Documents by their Ids. Utilizes Solr Realtime Get (RTG).
(PECL solr >= 0.9.7)
Returns the debug data for the last connection attempt
(PECL solr >= 0.9.6)
Returns the client options set internally
(PECL solr >= 0.9.2)
Defragments the index
(PECL solr >= 0.9.2)
Checks if Solr server is still up
(PECL solr >= 0.9.2)
Sends a raw update request
(PECL solr >= 0.9.2)
Rollbacks all add/deletes made to the index since the last commit
(PECL solr >= 0.9.11)
Sets the response writer used to prepare the response from Solr
(PECL solr >= 0.9.2)
Changes the specified servlet type to a new value
(PECL solr >= 2.0.0)
Retrieve Solr Server information
(PECL solr >= 0.9.2)
Checks the threads status
Details
SolrUpdateResponse
addDocument(SolrInputDocument $doc, bool $overwrite = true, int $commitWithin = 0)
(PECL solr >= 0.9.2)
Adds a document to the index
SolrUpdateResponse
addDocuments(array $docs, bool $overwrite = true, int $commitWithin = 0)
(PECL solr >= 0.9.2)
Adds a collection of SolrInputDocument instances to the index
SolrUpdateResponse
commit(bool $softCommit = false, bool $waitSearcher = true, bool $expungeDeletes = false)
(PECL solr >= 0.9.2)
Finalizes all add/deletes made to the index
__construct(array $clientOptions)
(PECL solr >= 0.9.2)
SolrClient constructor.
SolrUpdateResponse
deleteById(string $id)
(PECL solr >= 0.9.2)
Delete by Id
SolrUpdateResponse
deleteByIds(array $ids)
(PECL solr >= 0.9.2)
Deletes by Ids
SolrUpdateResponse
deleteByQueries(array $queries)
(PECL solr >= 0.9.2)
Removes all documents matching any of the queries
SolrUpdateResponse
deleteByQuery(string $query)
(PECL solr >= 0.9.2)
Deletes all documents matching the given query
__destruct()
(PECL solr >= 0.9.2)
Destructor for SolrClient
SolrQueryResponse
getById(string $id)
(PECL solr >= 2.2.0)
Get Document By Id. Utilizes Solr Realtime Get (RTG).
SolrQueryResponse
getByIds(array $ids)
(PECL solr >= 2.2.0)
Get Documents by their Ids. Utilizes Solr Realtime Get (RTG).
string
getDebug()
(PECL solr >= 0.9.7)
Returns the debug data for the last connection attempt
array
getOptions()
(PECL solr >= 0.9.6)
Returns the client options set internally
SolrUpdateResponse
optimize(int $maxSegments = 1, bool $softCommit = true, bool $waitSearcher = true)
(PECL solr >= 0.9.2)
Defragments the index
SolrPingResponse
ping()
(PECL solr >= 0.9.2)
Checks if Solr server is still up
SolrQueryResponse
query(SolrParams $query)
(PECL solr >= 0.9.2)
Sends a query to the server
SolrUpdateResponse
request(string $raw_request)
(PECL solr >= 0.9.2)
Sends a raw update request
SolrUpdateResponse
rollback()
(PECL solr >= 0.9.2)
Rollbacks all add/deletes made to the index since the last commit
setResponseWriter(string $responseWriter)
(PECL solr >= 0.9.11)
Sets the response writer used to prepare the response from Solr
bool
setServlet(int $type, string $value)
(PECL solr >= 0.9.2)
Changes the specified servlet type to a new value
SolrGenericResponse
system()
(PECL solr >= 2.0.0)
Retrieve Solr Server information
SolrGenericResponse
threads()
(PECL solr >= 0.9.2)
Checks the threads status