16 lines
239 B
Plaintext
16 lines
239 B
Plaintext
.Create or update a document
|
|
[source,js]
|
|
---------
|
|
client.index({
|
|
index: 'myindex',
|
|
type: 'mytype',
|
|
id: '1',
|
|
body: {
|
|
title: 'Test 1',
|
|
tags: ['y', 'z'],
|
|
published: true,
|
|
}
|
|
}, function (error, response) {
|
|
|
|
});
|
|
--------- |