id is not required when creating a document. If it's not specified, ES will generate a unique ID for the document.

This commit is contained in:
Smith, Blake (bs557j)
2017-01-09 11:16:07 -06:00
parent 52f15e0fca
commit bd1bbf1d15
2 changed files with 6 additions and 1 deletions

View File

@@ -32,6 +32,11 @@ client.indices.delete({
}, function (error) {
});
client.create({
index: 'index',
type: 'type'
});
client.create({
id: '123',
index: 'index',

View File

@@ -195,7 +195,7 @@ declare module Elasticsearch {
version?: number;
versionType?: VersionType;
pipeline?: string;
id: string;
id?: string;
index: string;
type: string;
}