From 4f35aef09435dc94999b4fcee4bb6a01d89ba48d Mon Sep 17 00:00:00 2001 From: Ahmad Ferdous Bin Alam Date: Tue, 17 Jan 2017 18:37:56 -0500 Subject: [PATCH] Remove invalid parameter id from DeleteDocumentByQueryParams (#14014) The parameter list of deleteByQuery function does not have `id`. The relevant documentation is available at https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletebyquery Even the Elasticsearch documentation available at https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete-by-query.html does not refer to any id parameter for that function. --- elasticsearch/elasticsearch-tests.ts | 11 +++++++++++ elasticsearch/index.d.ts | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/elasticsearch/elasticsearch-tests.ts b/elasticsearch/elasticsearch-tests.ts index 98d5a6c925..1be3f740bc 100644 --- a/elasticsearch/elasticsearch-tests.ts +++ b/elasticsearch/elasticsearch-tests.ts @@ -32,6 +32,17 @@ client.indices.delete({ }, function (error) { }); +client.deleteByQuery({ + index: 'test_index', + type: 'test_type', + body: { + query: { + } + } +}).then(function (response) { +}, function (error) { +}); + client.create({ index: 'index', type: 'type' diff --git a/elasticsearch/index.d.ts b/elasticsearch/index.d.ts index faeab9eb38..84c8f281f9 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 , Margus Lamp +// Definitions by: Casper Skydt , Blake Smith , Dave Dunkin , Jeffery Grajkowski , Margus Lamp , Ahmad Ferdous Bin Alam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module Elasticsearch {