In Kuzzle, you manipulate documents and subscriptions, both related to collections.
A collection is a set of data managed by Kuzzle. It acts like a data table for persistent documents, or like a room for pub/sub messages.
Collection(kuzzle, collection, index)
| ||object||Kuzzle object|
| ||string||The name of the collection you want to manipulate|
| ||string||Name of the index containing the collection|
Note: We recommend you instantiate a Collection object by calling Kuzzle.collection rather than using the constructor directly
| ||string||The name of the collection handled by this instance||get|
| ||object||Name of the index containing the collection||get|
| ||object||Headers for all sent documents.||get/set|
| ||object||linked Kuzzle instance||get|
headers property is inherited from the main
Kuzzle object and can be overrided
Collection myCollection = new Collection(kuzzle, "my-collection", "my-index");