From 28e73f82167adb34f205014e73a18ad0012a3155 Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 26 Oct 2016 19:09:33 -0700 Subject: [PATCH] [api] regenerate --- docs/api_methods.asciidoc | 82 +++------------------------------- docs/api_methods_0_90.asciidoc | 6 +++ docs/api_methods_1_0.asciidoc | 6 +++ docs/api_methods_1_1.asciidoc | 6 +++ docs/api_methods_1_2.asciidoc | 6 +++ docs/api_methods_1_3.asciidoc | 6 +++ docs/api_methods_1_4.asciidoc | 6 +++ docs/api_methods_1_5.asciidoc | 6 +++ docs/api_methods_1_6.asciidoc | 6 +++ docs/api_methods_1_7.asciidoc | 6 +++ docs/api_methods_2_0.asciidoc | 6 +++ docs/api_methods_2_1.asciidoc | 6 +++ docs/api_methods_2_2.asciidoc | 6 +++ docs/api_methods_2_3.asciidoc | 6 +++ docs/api_methods_2_4.asciidoc | 6 +++ src/lib/apis/0_90.js | 1 + src/lib/apis/1_0.js | 1 + src/lib/apis/1_1.js | 1 + src/lib/apis/1_2.js | 1 + src/lib/apis/1_3.js | 1 + src/lib/apis/1_4.js | 1 + src/lib/apis/1_5.js | 1 + src/lib/apis/1_6.js | 1 + src/lib/apis/1_7.js | 1 + src/lib/apis/2_0.js | 1 + src/lib/apis/2_1.js | 1 + src/lib/apis/2_2.js | 1 + src/lib/apis/2_3.js | 1 + src/lib/apis/2_4.js | 1 + src/lib/apis/5_0.js | 25 +---------- src/lib/apis/5_x.js | 25 +---------- src/lib/apis/master.js | 25 +---------- 32 files changed, 107 insertions(+), 148 deletions(-) diff --git a/docs/api_methods.asciidoc b/docs/api_methods.asciidoc index d93c87a3a..4956a69d8 100644 --- a/docs/api_methods.asciidoc +++ b/docs/api_methods.asciidoc @@ -286,82 +286,6 @@ client.create({ --------- -*Params* - -[horizontal] -`waitForActiveShards`:: -`String` -- Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) -`parent`:: -`String` -- ID of the parent document -`refresh`:: -`String` -- If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. -Options::: - * `"true"` - * `"false"` - * `"wait_for"` - * `""` - -`routing`:: -`String` -- Specific routing value -`timeout`:: -`Date, Number` -- Explicit operation timeout -`timestamp`:: -`Date, Number` -- Explicit timestamp for the document -`ttl`:: -`Date, Number` -- Expiration time for the document -`version`:: -`Number` -- Explicit version number for concurrency control -`versionType`:: -`String` -- Specific version type -Options::: - * `"internal"` - * `"external"` - * `"external_gte"` - * `"force"` - -`pipeline`:: -`String` -- The pipeline id to preprocess incoming documents with -`id`:: -`String` -- Document ID -`index`:: -`String` -- The name of the index -`type`:: -`String` -- The type of the document - -link:#[back to top] - -[[api-create]] -=== `create` - -[source,js] --------- -client.create([params, [callback]]) --------- - -Adds a typed JSON document in a specific index, making it searchable. If a document with the same `index`, `type`, and `id` already exists, an error will occur. - -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html[the elasticsearch docs] for more about this method. - -.Create a document -[source,js] ---------- -client.create({ - index: 'myindex', - type: 'mytype', - id: '1', - body: { - title: 'Test 1', - tags: ['y', 'z'], - published: true, - published_at: '2013-01-01', - counter: 1 - } -}, function (error, response) { - // ... -}); ---------- - - *Params* [horizontal] @@ -1060,6 +984,12 @@ client.index({ [horizontal] `waitForActiveShards`:: `String` -- Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_0_90.asciidoc b/docs/api_methods_0_90.asciidoc index a38ca5a49..830e11dbf 100644 --- a/docs/api_methods_0_90.asciidoc +++ b/docs/api_methods_0_90.asciidoc @@ -694,6 +694,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `percolate`:: diff --git a/docs/api_methods_1_0.asciidoc b/docs/api_methods_1_0.asciidoc index c9e2ba9b9..e89f10f8e 100644 --- a/docs/api_methods_1_0.asciidoc +++ b/docs/api_methods_1_0.asciidoc @@ -763,6 +763,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_1_1.asciidoc b/docs/api_methods_1_1.asciidoc index e0ac1ca6a..287f0d4ab 100644 --- a/docs/api_methods_1_1.asciidoc +++ b/docs/api_methods_1_1.asciidoc @@ -773,6 +773,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_1_2.asciidoc b/docs/api_methods_1_2.asciidoc index 837c941dd..f7f439931 100644 --- a/docs/api_methods_1_2.asciidoc +++ b/docs/api_methods_1_2.asciidoc @@ -773,6 +773,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_1_3.asciidoc b/docs/api_methods_1_3.asciidoc index 5f98f5551..a943bfd16 100644 --- a/docs/api_methods_1_3.asciidoc +++ b/docs/api_methods_1_3.asciidoc @@ -869,6 +869,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_1_4.asciidoc b/docs/api_methods_1_4.asciidoc index 95cb03c9d..2380b7e5f 100644 --- a/docs/api_methods_1_4.asciidoc +++ b/docs/api_methods_1_4.asciidoc @@ -917,6 +917,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_1_5.asciidoc b/docs/api_methods_1_5.asciidoc index 66a20cb2a..e9ac1a831 100644 --- a/docs/api_methods_1_5.asciidoc +++ b/docs/api_methods_1_5.asciidoc @@ -917,6 +917,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_1_6.asciidoc b/docs/api_methods_1_6.asciidoc index 077f5b4d1..4477c47e2 100644 --- a/docs/api_methods_1_6.asciidoc +++ b/docs/api_methods_1_6.asciidoc @@ -970,6 +970,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_1_7.asciidoc b/docs/api_methods_1_7.asciidoc index 560fcee2b..058d2b9f7 100644 --- a/docs/api_methods_1_7.asciidoc +++ b/docs/api_methods_1_7.asciidoc @@ -970,6 +970,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_2_0.asciidoc b/docs/api_methods_2_0.asciidoc index 3f6e09ec5..ab5c761eb 100644 --- a/docs/api_methods_2_0.asciidoc +++ b/docs/api_methods_2_0.asciidoc @@ -864,6 +864,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_2_1.asciidoc b/docs/api_methods_2_1.asciidoc index d7a39b435..ddf24327b 100644 --- a/docs/api_methods_2_1.asciidoc +++ b/docs/api_methods_2_1.asciidoc @@ -864,6 +864,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_2_2.asciidoc b/docs/api_methods_2_2.asciidoc index 1c8200dfd..221af3af0 100644 --- a/docs/api_methods_2_2.asciidoc +++ b/docs/api_methods_2_2.asciidoc @@ -864,6 +864,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_2_3.asciidoc b/docs/api_methods_2_3.asciidoc index 3b1770e64..a471f4837 100644 --- a/docs/api_methods_2_3.asciidoc +++ b/docs/api_methods_2_3.asciidoc @@ -864,6 +864,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/docs/api_methods_2_4.asciidoc b/docs/api_methods_2_4.asciidoc index c2d95894c..7257be718 100644 --- a/docs/api_methods_2_4.asciidoc +++ b/docs/api_methods_2_4.asciidoc @@ -864,6 +864,12 @@ Options::: * `"quorum"` * `"all"` +`[opType=index]`:: +`String` -- Explicit operation type +Options::: + * `"index"` + * `"create"` + `parent`:: `String` -- ID of the parent document `refresh`:: diff --git a/src/lib/apis/0_90.js b/src/lib/apis/0_90.js index 837fe823c..97684f4a7 100644 --- a/src/lib/apis/0_90.js +++ b/src/lib/apis/0_90.js @@ -1037,6 +1037,7 @@ api.getSource = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {String} params.percolate - Percolator queries to execute while indexing the document * @param {Boolean} params.refresh - Refresh the index after performing the operation diff --git a/src/lib/apis/1_0.js b/src/lib/apis/1_0.js index 737f85b0c..20278ed68 100644 --- a/src/lib/apis/1_0.js +++ b/src/lib/apis/1_0.js @@ -1560,6 +1560,7 @@ api.getSource = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} [params.replication=sync] - Specific replication type diff --git a/src/lib/apis/1_1.js b/src/lib/apis/1_1.js index f93c320f3..22e77b98d 100644 --- a/src/lib/apis/1_1.js +++ b/src/lib/apis/1_1.js @@ -1604,6 +1604,7 @@ api.getSource = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} [params.replication=sync] - Specific replication type diff --git a/src/lib/apis/1_2.js b/src/lib/apis/1_2.js index 8063016a6..3f049d81d 100644 --- a/src/lib/apis/1_2.js +++ b/src/lib/apis/1_2.js @@ -1659,6 +1659,7 @@ api.getSource = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} [params.replication=sync] - Specific replication type diff --git a/src/lib/apis/1_3.js b/src/lib/apis/1_3.js index 5764ca1eb..4a66ef22c 100644 --- a/src/lib/apis/1_3.js +++ b/src/lib/apis/1_3.js @@ -1775,6 +1775,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} [params.replication=sync] - Specific replication type diff --git a/src/lib/apis/1_4.js b/src/lib/apis/1_4.js index 7c926cd9d..ed2703513 100644 --- a/src/lib/apis/1_4.js +++ b/src/lib/apis/1_4.js @@ -1861,6 +1861,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} [params.replication=sync] - Specific replication type diff --git a/src/lib/apis/1_5.js b/src/lib/apis/1_5.js index 945a72010..3bcf87feb 100644 --- a/src/lib/apis/1_5.js +++ b/src/lib/apis/1_5.js @@ -1892,6 +1892,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} [params.replication=sync] - Specific replication type diff --git a/src/lib/apis/1_6.js b/src/lib/apis/1_6.js index a1b5496ce..d38f83267 100644 --- a/src/lib/apis/1_6.js +++ b/src/lib/apis/1_6.js @@ -1983,6 +1983,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} [params.replication=sync] - Specific replication type diff --git a/src/lib/apis/1_7.js b/src/lib/apis/1_7.js index a7434ae08..845e0071b 100644 --- a/src/lib/apis/1_7.js +++ b/src/lib/apis/1_7.js @@ -1987,6 +1987,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} [params.replication=sync] - Specific replication type diff --git a/src/lib/apis/2_0.js b/src/lib/apis/2_0.js index 7a2e98dc7..31b66a629 100644 --- a/src/lib/apis/2_0.js +++ b/src/lib/apis/2_0.js @@ -1905,6 +1905,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} params.routing - Specific routing value diff --git a/src/lib/apis/2_1.js b/src/lib/apis/2_1.js index d0147eb8e..70ff1e3ad 100644 --- a/src/lib/apis/2_1.js +++ b/src/lib/apis/2_1.js @@ -1980,6 +1980,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} params.routing - Specific routing value diff --git a/src/lib/apis/2_2.js b/src/lib/apis/2_2.js index 962f3d133..4ae95e9b8 100644 --- a/src/lib/apis/2_2.js +++ b/src/lib/apis/2_2.js @@ -1986,6 +1986,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} params.routing - Specific routing value diff --git a/src/lib/apis/2_3.js b/src/lib/apis/2_3.js index 2fbb331c4..f5d64123d 100644 --- a/src/lib/apis/2_3.js +++ b/src/lib/apis/2_3.js @@ -1986,6 +1986,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the index after performing the operation * @param {String} params.routing - Specific routing value diff --git a/src/lib/apis/2_4.js b/src/lib/apis/2_4.js index 21c4a3334..eb1970f51 100644 --- a/src/lib/apis/2_4.js +++ b/src/lib/apis/2_4.js @@ -1986,6 +1986,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.consistency - Explicit write consistency setting for the operation + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {Boolean} params.refresh - Refresh the affected shards after performing the operation * @param {String} params.routing - Specific routing value diff --git a/src/lib/apis/5_0.js b/src/lib/apis/5_0.js index fd7157329..1807c01c4 100644 --- a/src/lib/apis/5_0.js +++ b/src/lib/apis/5_0.js @@ -2498,6 +2498,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {String} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. * @param {String} params.routing - Specific routing value @@ -7090,27 +7091,3 @@ api.updateByQuery = ca({ ], method: 'POST' }); - -/** - * Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request - * - * @param {Object} params - An object with parameters used to carry out this action - * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - * @param {String} params.parent - ID of the parent document - * @param {String} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. - * @param {String} params.routing - Specific routing value - * @param {Date, Number} params.timeout - Explicit operation timeout - * @param {Date, Number} params.timestamp - Explicit timestamp for the document - * @param {Date, Number} params.ttl - Expiration time for the document - * @param {Number} params.version - Explicit version number for concurrency control - * @param {String} params.versionType - Specific version type - * @param {String} params.pipeline - The pipeline id to preprocess incoming documents with - * @param {String} params.id - Document ID - * @param {String} params.index - The name of the index - * @param {String} params.type - The type of the document - */ -api.create = ca.proxy(api.index, { - transform: function (params) { - params.op_type = 'create'; - } -}); diff --git a/src/lib/apis/5_x.js b/src/lib/apis/5_x.js index b758d4823..25ccd6757 100644 --- a/src/lib/apis/5_x.js +++ b/src/lib/apis/5_x.js @@ -2584,6 +2584,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {String} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. * @param {String} params.routing - Specific routing value @@ -7134,27 +7135,3 @@ api.updateByQuery = ca({ ], method: 'POST' }); - -/** - * Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request - * - * @param {Object} params - An object with parameters used to carry out this action - * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - * @param {String} params.parent - ID of the parent document - * @param {String} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. - * @param {String} params.routing - Specific routing value - * @param {Date, Number} params.timeout - Explicit operation timeout - * @param {Date, Number} params.timestamp - Explicit timestamp for the document - * @param {Date, Number} params.ttl - Expiration time for the document - * @param {Number} params.version - Explicit version number for concurrency control - * @param {String} params.versionType - Specific version type - * @param {String} params.pipeline - The pipeline id to preprocess incoming documents with - * @param {String} params.id - Document ID - * @param {String} params.index - The name of the index - * @param {String} params.type - The type of the document - */ -api.create = ca.proxy(api.index, { - transform: function (params) { - params.op_type = 'create'; - } -}); diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index d5ec6d8df..afcc5fa23 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -2584,6 +2584,7 @@ api.getTemplate = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * @param {String} [params.opType=index] - Explicit operation type * @param {String} params.parent - ID of the parent document * @param {String} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. * @param {String} params.routing - Specific routing value @@ -7134,27 +7135,3 @@ api.updateByQuery = ca({ ], method: 'POST' }); - -/** - * Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request - * - * @param {Object} params - An object with parameters used to carry out this action - * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - * @param {String} params.parent - ID of the parent document - * @param {String} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. - * @param {String} params.routing - Specific routing value - * @param {Date, Number} params.timeout - Explicit operation timeout - * @param {Date, Number} params.timestamp - Explicit timestamp for the document - * @param {Date, Number} params.ttl - Expiration time for the document - * @param {Number} params.version - Explicit version number for concurrency control - * @param {String} params.versionType - Specific version type - * @param {String} params.pipeline - The pipeline id to preprocess incoming documents with - * @param {String} params.id - Document ID - * @param {String} params.index - The name of the index - * @param {String} params.type - The type of the document - */ -api.create = ca.proxy(api.index, { - transform: function (params) { - params.op_type = 'create'; - } -});