SDK
SDK Java v3.x
2

# mDelete

Deletes multiple documents.


# Arguments

Copied to clipboard!
public CompletableFuture<ConcurrentHashMap<String, ArrayList<Object>>> mDelete(
      final String index,
      final String collection,
      final ArrayList<String> ids)
throws NotConnectedException, InternalException

Arguments Type Description
index
String
Index name
collection
String
Collection name
ids ArrayList<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:

Property Type Description
_id
String
Document ID
reason
String
Human readable reason

# Usage

Copied to clipboard!
  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=[]
    }
*/