mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #30774 from NicolasBiehler/patch-1
fix: extend @types/elasticsearch IndicesUpdateAliasesParamsAction parameters
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -1400,6 +1400,8 @@ export interface IndicesUpdateAliasesParamsAction {
|
||||
index?: string;
|
||||
indices?: string[];
|
||||
alias: string;
|
||||
routing?: string;
|
||||
filter?: object;
|
||||
};
|
||||
remove?: {
|
||||
index?: string;
|
||||
|
||||
Reference in New Issue
Block a user