Merge pull request #23999 from deerawan/routing-elasticsearch

Elasticsearch: Add _routing in GetResponse
This commit is contained in:
Bowden Kelly
2018-03-01 10:30:09 -08:00
committed by GitHub
2 changed files with 11 additions and 0 deletions
@@ -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: [
+2
View File
@@ -8,6 +8,7 @@
// Ahmad Ferdous Bin Alam <https://github.com/ahmadferdous>
// Simon Schick <https://github.com/SimonSchick>
// Paul Brabban <https://github.com/brabster>
// Budi Irawan <https://github.com/deerawan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -407,6 +408,7 @@ export interface GetResponse<T> {
_type: string;
_id: string;
_version: number;
_routing?: string;
found: boolean;
_source: T;
}