diff --git a/types/elasticsearch/elasticsearch-tests.ts b/types/elasticsearch/elasticsearch-tests.ts index 2e90389126..10c4659998 100644 --- a/types/elasticsearch/elasticsearch-tests.ts +++ b/types/elasticsearch/elasticsearch-tests.ts @@ -169,6 +169,15 @@ client.index({ }, (error, response) => { }); +client.get({ + index: 'myindex', + type: 'mytype', + id: '1', + routing: '1' +}, (error, response) => { + const routing = response._routing; +}); + client.mget({ body: { docs: [ diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index 4d53575749..c6b05da9a0 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -8,6 +8,7 @@ // Ahmad Ferdous Bin Alam // Simon Schick // Paul Brabban +// Budi Irawan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -407,6 +408,7 @@ export interface GetResponse { _type: string; _id: string; _version: number; + _routing?: string; found: boolean; _source: T; }