Merge pull request #30774 from NicolasBiehler/patch-1

fix: extend @types/elasticsearch IndicesUpdateAliasesParamsAction parameters
This commit is contained in:
Mine Starks
2018-11-28 07:34:05 -08:00
committed by GitHub
2 changed files with 34 additions and 11 deletions
+32 -11
View File
@@ -209,7 +209,7 @@ client.get({
id: '1',
routing: '1'
}, (error, response) => {
const routing = response._routing;
const routing = response._routing;
});
client.mget({
@@ -338,22 +338,43 @@ client.indices.updateAliases({
// ...
});
client.reindex({
body: {
source: {
index: "twitter"
},
dest: {
index: "new_twitter"
client.indices.updateAliases({
body: {
actions: [
{
add: {
index: 'logstash-2018.11', alias: 'logstash-filtered', filter: {
query: {
exists: { field: 'id' }
}
},
routing: 'id'
}
}
]
}
}).then((response) => {
// ...
}, (error) => {
// ...
});
client.reindex({
body: {
source: {
index: "twitter"
},
dest: {
index: "new_twitter"
}
}
})
.then(response => {
.then(response => {
const { took, timed_out } = response;
// ...
});
});
// Errors
function testErrors() {
throw new elasticsearch.errors.AuthenticationException();
throw new elasticsearch.errors.AuthenticationException();
}
+2
View File
@@ -1400,6 +1400,8 @@ export interface IndicesUpdateAliasesParamsAction {
index?: string;
indices?: string[];
alias: string;
routing?: string;
filter?: object;
};
remove?: {
index?: string;