SDK
SDK Android v3.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.

collection #

Instantiates a new Collection object.


collection(collection, [index]) #

ArgumentsTypeDescription
collectionstringThe name of the collection you want to manipulate
indexstringThe name of the index containing the collection

If no index is provided, the factory will take the default index set in the main Kuzzle SDK instance. If no default index has been set, an error is thrown.

The index argument takes precedence over the default index.


Return Value #

Returns a Collection object.

Usage #

Collection collection = kuzzle.collection("collection", "index");
// or using a default index:
kuzzle.setDefaultIndex("index");
Collection collection = kuzzle.collection("collection");