mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
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:
@@ -32,6 +32,11 @@ client.indices.delete({
|
||||
}, function (error) {
|
||||
});
|
||||
|
||||
client.create({
|
||||
index: 'index',
|
||||
type: 'type'
|
||||
});
|
||||
|
||||
client.create({
|
||||
id: '123',
|
||||
index: 'index',
|
||||
|
||||
2
elasticsearch/index.d.ts
vendored
2
elasticsearch/index.d.ts
vendored
@@ -195,7 +195,7 @@ declare module Elasticsearch {
|
||||
version?: number;
|
||||
versionType?: VersionType;
|
||||
pipeline?: string;
|
||||
id: string;
|
||||
id?: string;
|
||||
index: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user