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 #
String[] documentIds = new String[]{"doc1", "doc2"};
kuzzle
.collection("collection", "index")
.mDeleteDocument(documentIds, new ResponseListener<JSONObject>() {
@Override
public void onSuccess(JSONObject object) {
// callback called once the mDelete operation has completed
// => the result is a JSON object containing the raw Kuzzle response
}
@Override
public void onError(JSONObject error) {
// Handle error
}
});
Callback response:
["doc1", "doc2"]
Edit this page on Github(opens new window)