[api] regenerate

This commit is contained in:
spalger
2016-10-26 19:09:33 -07:00
parent 006b8917ef
commit 28e73f8216
32 changed files with 107 additions and 148 deletions

View File

@ -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 <<api-conventions,params and return values>> 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`::

View File

@ -694,6 +694,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`percolate`::

View File

@ -763,6 +763,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -773,6 +773,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -773,6 +773,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -869,6 +869,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -917,6 +917,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -917,6 +917,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -970,6 +970,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -970,6 +970,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -864,6 +864,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -864,6 +864,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -864,6 +864,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -864,6 +864,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -864,6 +864,12 @@ Options:::
* `"quorum"`
* `"all"`
`[opType=index]`::
`String` -- Explicit operation type
Options:::
* `"index"`
* `"create"`
`parent`::
`String` -- ID of the parent document
`refresh`::

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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';
}
});

View File

@ -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';
}
});

View File

@ -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';
}
});