CakeFest 2017 NYC, the Official CakePHP Conference


(PECL solr >= 0.9.2)

SolrClient::deleteByQueryDeletes all documents matching the given query


public SolrUpdateResponse SolrClient::deleteByQuery ( string $query )

Deletes all documents matching the given query.

Elenco dei parametri


The query

Valori restituiti

Returns a SolrUpdateResponse on success and throws an exception on failure.


Throws SolrClientException if the client had failed, or there was a connection issue.

Throws SolrServerException if the Solr Server had failed to process the request.


Example #1 SolrQuery::deleteByQuery() example


= array
'port'     => SOLR_SERVER_PORT,

$client = new SolrClient($options);

//This will erase the entire index


Vedere anche:

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top