SDK
SDK Java v3.x
2

This SDK is deprecated. We recommend to use the Kuzzle SDK-JVM.
A migration guide is available here

mDelete #

Deletes multiple documents.


Arguments #

public CompletableFuture<ConcurrentHashMap<String, ArrayList<Object>>> mDelete(
      final String index,
      final String collection,
      final ArrayList<String> ids)
throws NotConnectedException, InternalException
ArgumentsTypeDescription
index
String
Index name
collection
String
Collection name
idsArrayList<String>Document IDs

Return #

A ConcurrentHashMap<String, ArrayList<Object>> which has a successes and errors ArrayList<Object>: The successes array contains the successfully deleted document IDs.

Each deletion error is an object of the errors array with the following properties:

PropertyTypeDescription
_id
String
Document ID
reason
String
Human readable reason

Usage #

  final ArrayList<String> ids = new ArrayList<>();
  ids.add("some-id");
  ids.add("some-id2");
  ConcurrentHashMap<String, ArrayList<Object>> result = kuzzle.getDocumentController().mDelete("nyc-open-data", "yellow-taxi", ids)
  .get();
/*
  result =
    {
      successes=[some-id, some-id2],
      errors=[]
    }
*/