From 1414eeea60afe42e45b2d3a50f8dc72b126ee5fb Mon Sep 17 00:00:00 2001 From: Margus Lamp Date: Tue, 17 Jan 2017 23:13:58 +0200 Subject: [PATCH] Elasticsearch client.deleteByQuery params update for 5.x (#14053) * Elasticsearch client.deleteByQuery params update for 5.x * Header fix * Added _source, _sourceExclude, _sourceInclude * df and from are optional parameters --- elasticsearch/index.d.ts | 47 ++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/elasticsearch/index.d.ts b/elasticsearch/index.d.ts index 6558c94f2f..faeab9eb38 100644 --- a/elasticsearch/index.d.ts +++ b/elasticsearch/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for elasticsearch 5.0 // Project: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html -// Definitions by: Casper Skydt , Blake Smith , Dave Dunkin , Jeffery Grajkowski +// Definitions by: Casper Skydt , Blake Smith , Dave Dunkin , Jeffery Grajkowski , Margus Lamp // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module Elasticsearch { @@ -143,6 +143,7 @@ declare module Elasticsearch { export type VersionType = "internal" | "external" | "external_gte" | "force"; export type ExpandWildcards = "open" | "closed" | "none" | "all"; export type DefaultOperator = "AND" | "OR"; + export type Conflicts = "abort" | "proceed"; export interface BulkIndexDocumentsParams extends GenericParams { waitForActiveShards?: string; @@ -234,16 +235,40 @@ declare module Elasticsearch { } export interface DeleteDocumentByQueryParams extends GenericParams { - waitForActiveShards?: string; - parent?: string; - refresh?: Refresh; - routing?: string; - timeout?: TimeSpan; + analyzer?: string; + analyzeWildcard?: boolean; + defaultOperator?: DefaultOperator; + df?: string; + from?: number; + ignoreUnavailable?: boolean; + allowNoIndices?: boolean; + conflicts?: Conflicts; + expandWildcards?: ExpandWildcards; + lenient?: boolean; + lowercaseExpandedTerms?: boolean; + preference?: string; + q?: string; + routing?: string | string[] | boolean; + scroll?: string; + searchType?: "query_then_fetch" | "dfs_query_then_fetch"; + searchTimeout?: TimeSpan; + size?: number; + sort?: NameList; + _source?: NameList; + _sourceExclude?: NameList; + _sourceInclude?: NameList; + terminateAfter?: number; + stats?: string | string[] | boolean; version?: number; - versionType?: VersionType; - index: string; - type: string; - id: string; + requestCache?: boolean; + refresh?: Refresh; + timeout?: TimeSpan; + waitForActiveShards?: string; + scrollSize?: number; + waitForCompletion?: boolean; + requestsPerSecond?: number; + index?: string; + type?: string; } export interface DeleteDocumentByQueryResponse { @@ -710,7 +735,7 @@ declare module Elasticsearch { from?: number; ignoreUnavailable?: boolean; allowNoIndices?: boolean; - conflicts?: "abort" | "proceed"; + conflicts?: Conflicts; expandWildcards?: ExpandWildcards; lenient?: boolean; lowercaseExpandedTerms?: boolean;