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
This commit is contained in:
Margus Lamp
2017-01-17 23:13:58 +02:00
committed by Mohamed Hegazy
parent eccba27fb5
commit 1414eeea60

View File

@@ -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 <https://github.com/CasperSkydt>, Blake Smith <https://github.com/bfsmith>, Dave Dunkin <https://github.com/ddunkin>, Jeffery Grajkowski <https://github.com/pushplay>
// Definitions by: Casper Skydt <https://github.com/CasperSkydt>, Blake Smith <https://github.com/bfsmith>, Dave Dunkin <https://github.com/ddunkin>, Jeffery Grajkowski <https://github.com/pushplay>, Margus Lamp <https://github.com/mlamp>
// 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;