SDK
SDK Java v1.x
1

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.

This SDK has been deprecated because of stability issues. It is not advised to use it in a production environment.

mGet #

Gets multiple documents.

Throws a partial error (error code 206) if one or more document can not be retrieved.

Arguments #

String mGet(
  String index,
  String collection,
  io.kuzzle.sdk.StringVector ids,
  io.kuzzle.sdk.QueryOptions options
)
String mGet(
  String index,
  String collection,
  io.kuzzle.sdk.StringVector ids
)

ArgumentTypeDescription
index
String
Index name
collection
String
Collection name
idsio.kuzzle.sdk.StringVectorDocument IDs
options
io.kuzzle.sdk.QueryOptions
Query options

options #

Additional query options

OptionType
(default)
Description
queuable
boolean

(true)
If true, queues the request during downtime, until connected to Kuzzle again

Return #

Returns a JSON string containing the retrieved documents.

Exceptions #

Throws a io.kuzzle.sdk.KuzzleException if there is an error. See how to handle error.

Usage #

StringVector ids = new StringVector();
ids.add("some-id");
ids.add("some-other-id");
try {
  kuzzle.getDocument().create("nyc-open-data", "yellow-taxi", "some-id", "{}");
  kuzzle.getDocument().create("nyc-open-data", "yellow-taxi", "some-other-id", "{}");
  String response = kuzzle.getDocument().mGet("nyc-open-data", "yellow-taxi", ids);
  System.out.println(response);
  System.out.println("Success");
} catch (KuzzleException e) {
  System.err.println(e.getMessage());
}