SDK PHP v3.x

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

mDeleteDocument #

Delete multiple Documents according to the input IDs.

mDeleteDocument(documentIds, [options], callback) #

Arguments Type Description
documentIds String[] Array of IDs of documents to delete
options JSON Object Optional parameters
callback function Callback handling the response

Options #

Option Type Description Default
queuable boolean Make this request queuable or not true

Callback Response #

Returns a JSON object containing the raw Kuzzle response. Can return a 206 partial error in cases where some documents could not be deleted.

Usage #

Copied to clipboard!
use \Kuzzle\Kuzzle;
$kuzzle = new Kuzzle('localhost');
$dataCollection = $kuzzle->collection('collection', 'index');
try {
  $result = $dataCollection->mDeleteDocument(['doc1', 'doc2']);
catch (ErrorException $e) {

Callback response:

Copied to clipboard!
["doc1", "doc2"]