document #
Creates a new Document object, using its constructor.
document([id], [content]) #
Arguments | Type | Description |
---|---|---|
id | string | Optional document unique ID |
content | JSON object | Optional document content |
Return Value #
Returns the newly created Document object.
Usage #
Document document = kuzzle
.collection("collection", "index")
.document("id", new JSONObject().put("some", "content"))
.save();
Edit this page on Github(opens new window)