added docs to the repo
This commit is contained in:
18
docs/_examples/create.asciidoc
Normal file
18
docs/_examples/create.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
.Create a document
|
||||
[source,js]
|
||||
---------
|
||||
client.create({
|
||||
index: 'myindex',
|
||||
type: 'mytype',
|
||||
id: '1',
|
||||
body: {
|
||||
title: 'Test 1',
|
||||
tags: ['y', 'z'],
|
||||
published: true,
|
||||
published_at: '2013-01-01',
|
||||
counter: 1
|
||||
}
|
||||
}, function (error, response) {
|
||||
// ...
|
||||
});
|
||||
---------
|
||||
Reference in New Issue
Block a user