deleteSpecifications

// Deleting specifications using callbacks (NodeJS or Web Browser)
kuzzle
  .collection('collection', 'index')
  .deleteSpecifications(function (err, res) {
    // callback called once the delete action has been completed
  });

// Deleting specifications using promises (NodeJS)
kuzzle
  .collection('collection', 'index')
  .deleteSpecificationsPromise()
  .then(res => {
    // promises resolved once the delete action has been completed
  });
// Deleting one document
kuzzle
  .collection("collection", "index")
  .deleteSpecifications(new ResponseListener<JSONObject>() {
    @Override
    public void onSuccess(JSONObject result) {

    }

    @Override
    public void onError(JSONObject error) {
      // Handle error
    }
  });
<?php

use \Kuzzle\Kuzzle;

$kuzzle = new Kuzzle('localhost');
$dataCollection = $kuzzle->collection('collection', 'index');

// Deleting one document
try {
  $result = $dataCollection->deleteSpecifications();
}
catch (ErrorException $e) {

}

Callback response:

{
  "acknowledged": true
}

Delete specifications linked to the collection object.


deleteSpecifications([options], [callback])

ArgumentsTypeDescription
optionsJSON objectOptional parameters
callbackfunctionOptional callback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue
refreshstringIf set to wait_for, Kuzzle will wait the persistence layer indexation to return (available with Elasticsearch 5.x and above)undefined

Return value

Returns the Collection object to allow chaining.