code | type | title | description |
---|---|---|---|
false |
page |
mcreateDocument |
Collection:mcreateDocument |
Create the input Documents.
Arguments | Type | Description |
---|---|---|
documents |
Document[] | Array of Document to create |
options |
JSON Object | Optional parameters |
callback |
function | Optional callback |
Option | Type | Description | Default |
---|---|---|---|
queuable |
boolean | Make this request queuable or not | true |
Returns the Collection
object to allow chaining.
Returns a JSON object
containing the raw Kuzzle response.
Can return a 206 partial error in cases where some documents could not be created.
<<< ./snippets/mcreate-document-1.js
Callback response:
{
"hits": [{ "first": "document" }, { "second": "document" }],
"total": 2
}