* @link https://github.com/pjmazenot/phpsolr-phpdoc
*/
/**
* (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.
* @link https://php.net/manual/en/class.solrclient.php
*/
final class SolrClient
{
/** @var int Used when updating the search servlet. */
public const SEARCH_SERVLET_TYPE = 1;
/** @var int Used when updating the update servlet. */
public const UPDATE_SERVLET_TYPE = 2;
/** @var int Used when updating the threads servlet. */
public const THREADS_SERVLET_TYPE = 4;
/** @var int Used when updating the ping servlet. */
public const PING_SERVLET_TYPE = 8;
/** @var int Used when updating the terms servlet. */
public const TERMS_SERVLET_TYPE = 16;
/** @var int Used when retrieving system information from the system servlet. */
public const SYSTEM_SERVLET_TYPE = 32;
/** @var string This is the initial value for the search servlet. */
public const DEFAULT_SEARCH_SERVLET = 'select';
/** @var string This is the initial value for the update servlet. */
public const DEFAULT_UPDATE_SERVLET = 'update';
/** @var string This is the initial value for the threads servlet. */
public const DEFAULT_THREADS_SERVLET = 'admin/threads';
/** @var string This is the initial value for the ping servlet. */
public const DEFAULT_PING_SERVLET = 'admin/ping';
/** @var string This is the initial value for the terms servlet used for the TermsComponent. */
public const DEFAULT_TERMS_SERVLET = 'terms';
/** @var string This is the initial value for the system servlet used to obtain Solr Server information. */
public const DEFAULT_SYSTEM_SERVLET = 'admin/system';
/**
* (PECL solr >= 0.9.2)
* Adds a document to the index
* @link https://php.net/manual/en/solrclient.adddocument.php
* @param SolrInputDocument $doc
* The SolrInputDocument instance. *
* @param bool $overwrite [optional]* Whether to overwrite existing document or not. If FALSE there will be duplicates (several documents with * the same ID). *
** Number of milliseconds within which to auto commit this document. Available since Solr 1.4 . Default (0) means * disabled. *
** When this value specified, it leaves the control of when to do the commit to Solr itself, optimizing number of * commits to a minimum while still fulfilling the update latency requirements, and Solr will automatically do a * commit when the oldest add in the buffer is due. *
* @return SolrUpdateResponse* Returns a SolrUpdateResponse object or throws an Exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function addDocument(SolrInputDocument $doc, $overwrite = true, $commitWithin = 0) {} /** * (PECL solr >= 0.9.2)* An array containing the collection of SolrInputDocument instances. This array must be an actual variable. *
* @param bool $overwrite [optional]* Whether to overwrite existing document or not. If FALSE there will be duplicates (several documents with * the same ID). *
** Number of milliseconds within which to auto commit this document. Available since Solr 1.4 . Default (0) means * disabled. *
** When this value specified, it leaves the control of when to do the commit to Solr itself, optimizing number of * commits to a minimum while still fulfilling the update latency requirements, and Solr will automatically do a * commit when the oldest add in the buffer is due. *
* @return SolrUpdateResponse* Returns a SolrUpdateResponse object or throws an Exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function addDocuments(array $docs, $overwrite = true, $commitWithin = 0) {} /** * (PECL solr >= 0.9.2)* This will refresh the 'view' of the index in a more performant manner, but without "on-disk" guarantees. * (Solr4.0+) *
** A soft commit is much faster since it only makes index changes visible and does not fsync index files or write a * new index descriptor. If the JVM crashes or there is a loss of power, changes that occurred after the last hard * commit will be lost. Search collections that have near-real-time requirements (that want index changes to be * quickly visible to searches) will want to soft commit often but hard commit less frequently. *
* @param bool $waitSearcher [optional]* block until a new searcher is opened and registered as the main query searcher, making the changes visible. *
* @param bool $expungeDeletes [optional]* Merge segments with deletes away. (Solr1.4+) *
* @return SolrUpdateResponse* Returns a SolrUpdateResponse object or throws an Exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function commit($softCommit = false, $waitSearcher = true, $expungeDeletes = false) {} /** * (PECL solr >= 0.9.2)* This is an array containing one of the following keys : *
** Please note the if the ssl_cert file only contains the private certificate, you have to specify a separate * ssl_key file. *
** The ssl_keypassword option is required if the ssl_cert or ssl_key options are set. *
* @throws SolrIllegalArgumentException */ public function __construct(array $clientOptions) {} /** * (PECL solr >= 0.9.2)* The value of the uniqueKey field declared in the schema *
* @return SolrUpdateResponse* Returns a SolrUpdateResponse on success and throws an exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function deleteById($id) {} /** * (PECL solr >= 0.9.2)* An array of IDs representing the uniqueKey field declared in the schema for each document to be deleted. This * must be an actual php variable. *
* @return SolrUpdateResponse* Returns a SolrUpdateResponse on success and throws an exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function deleteByIds(array $ids) {} /** * (PECL solr >= 0.9.2)* The array of queries. This must be an actual php variable. *
* @return SolrUpdateResponse* Returns a SolrUpdateResponse on success and throws an exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function deleteByQueries(array $queries) {} /** * (PECL solr >= 0.9.2)* The query *
* @return SolrUpdateResponse* Returns a SolrUpdateResponse on success and throws an exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function deleteByQuery($query) {} /** * (PECL solr >= 0.9.2)* Document ID *
* @return SolrQueryResponse */ public function getById($id) {} /** * (PECL solr >= 2.2.0)* Document ids *
* @return SolrQueryResponse */ public function getByIds(array $ids) {} /** * (PECL solr >= 0.9.7)* Returns a string on success and null if there is nothing to return. *
*/ public function getDebug() {} /** * (PECL solr >= 0.9.6)* Returns an array containing all the options for the SolrClient object set internally. *
*/ public function getOptions() {} /** * (PECL solr >= 0.9.2)* Optimizes down to at most this number of segments. Since Solr 1.3 *
* @param bool $softCommit* This will refresh the 'view' of the index in a more performant manner, but without "on-disk" guarantees. * (Solr4.0+) *
* @param bool $waitSearcher* Block until a new searcher is opened and registered as the main query searcher, making the changes visible. *
* @return SolrUpdateResponse* Returns a SolrUpdateResponse on success and throws an exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function optimize($maxSegments = 1, $softCommit = true, $waitSearcher = true) {} /** * (PECL solr >= 0.9.2)* Returns a SolrPingResponse object on success and throws an exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function ping() {} /** * (PECL solr >= 0.9.2)* A SolrParams object. It is recommended to use SolrQuery for advanced queries. *
* @return SolrQueryResponse* Returns a SolrUpdateResponse on success and throws an exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function query(SolrParams $query) {} /** * (PECL solr >= 0.9.2)* An XML string with the raw request to the server. *
* @return SolrUpdateResponse* Returns a SolrUpdateResponse on success and throws an exception on failure. *
* @throws SolrIllegalArgumentException* Throws SolrIllegalArgumentException if raw_request was an empty string. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function request($raw_request) {} /** * (PECL solr >= 0.9.2)* Returns a SolrUpdateResponse on success and throws an exception on failure. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function rollback() {} /** * (PECL solr >= 0.9.11)* One of the following: *
** One of the following : *
** The new value for the servlet *
* @return bool* Returns TRUE on success or FALSE on failure. *
*/ public function setServlet($type, $value) {} /** * (PECL solr >= 2.0.0)* Returns a SolrGenericResponse object on success. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function system() {} /** * (PECL solr >= 0.9.2)* Returns a SolrGenericResponse object on success. *
* @throws SolrClientException* Throws SolrClientException if the client had failed, or there was a connection issue. *
* @throws SolrServerException* Throws SolrServerException if the Solr Server had failed to satisfy the request. *
*/ public function threads() {} }