mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Merge pull request #24104 from deerawan/elasticsearch-updatebyquery-resp
Elasticsearch: Add UpdateDocumentByQueryResponse
This commit is contained in:
@@ -266,6 +266,30 @@ client.search({
|
||||
}
|
||||
});
|
||||
|
||||
client.updateByQuery({
|
||||
index: 'myIndex',
|
||||
type: 'mytype',
|
||||
}, (error, response) => {
|
||||
const {
|
||||
took,
|
||||
timed_out,
|
||||
updated,
|
||||
deleted,
|
||||
batches,
|
||||
version_conflicts,
|
||||
noops,
|
||||
retries,
|
||||
throttled_millis,
|
||||
throttled_until_millis,
|
||||
total,
|
||||
failures
|
||||
} = response;
|
||||
|
||||
const { bulk, search } = retries;
|
||||
|
||||
// ...
|
||||
});
|
||||
|
||||
client.indices.updateAliases({
|
||||
body: {
|
||||
actions: [
|
||||
|
||||
Vendored
+21
-2
@@ -89,8 +89,8 @@ export class Client {
|
||||
termvectors(params: TermvectorsParams, callback: (error: any, response: any) => void): void;
|
||||
update(params: UpdateDocumentParams): Promise<any>;
|
||||
update(params: UpdateDocumentParams, callback: (error: any, response: any) => void): void;
|
||||
updateByQuery(params: UpdateDocumentByQueryParams): Promise<any>;
|
||||
updateByQuery(params: UpdateDocumentByQueryParams, callback: (error: any, response: any) => void): void;
|
||||
updateByQuery(params: UpdateDocumentByQueryParams): Promise<UpdateDocumentByQueryResponse>;
|
||||
updateByQuery(params: UpdateDocumentByQueryParams, callback: (error: any, response: UpdateDocumentByQueryResponse) => void): void;
|
||||
close(): void;
|
||||
}
|
||||
|
||||
@@ -785,6 +785,25 @@ export interface UpdateDocumentByQueryParams extends GenericParams {
|
||||
type: NameList;
|
||||
}
|
||||
|
||||
export interface UpdateDocumentByQueryResponse {
|
||||
took: number;
|
||||
timed_out: boolean;
|
||||
updated: number;
|
||||
deleted: number;
|
||||
batches: number;
|
||||
version_conflicts: number;
|
||||
noops: number;
|
||||
retries: {
|
||||
bulk: number;
|
||||
search: number;
|
||||
};
|
||||
throttled_millis: number;
|
||||
requests_per_second: number;
|
||||
throttled_until_millis: number;
|
||||
total: number;
|
||||
failures: any[];
|
||||
}
|
||||
|
||||
export interface Cat {
|
||||
aliases(params: CatAliasesParams, callback: (error: any, response: any) => void): void;
|
||||
aliases(params: CatAliasesParams): Promise<any>;
|
||||
|
||||
Reference in New Issue
Block a user