diff --git a/docs/api_methods.asciidoc b/docs/api_methods.asciidoc index d853174f4..46585b257 100644 --- a/docs/api_methods.asciidoc +++ b/docs/api_methods.asciidoc @@ -1,5 +1,5 @@ [[api-reference]] -== 6.3 API +== 6.4 API NOTE: This is currently the default API, but in upcoming versions that will change. We recommend setting the `apiVersion` config param when you instantiate your client to make sure that the API does not change unexpectedly. @@ -15,7 +15,7 @@ client.bulk([params, [callback]]) Perform many index/delete operations in a single API call. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-bulk.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-bulk.html[the elasticsearch docs] for more information pertaining to this method. .Perform three operations in a single request [source,js] @@ -72,7 +72,7 @@ Options::: `index`:: <> -- Default index for items which don't provide one `body`:: -<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-bulk.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-bulk.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -86,7 +86,7 @@ client.clearScroll([params, [callback]]) Clear the scroll request created by specifying the scroll parameter to search. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-request-scroll.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-scroll.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -97,7 +97,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `scrollId`:: <>, <>, <> -- A comma-separated list of scroll IDs to clear `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-request-scroll.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-scroll.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -111,7 +111,7 @@ client.count([params, [callback]]) Get the number of documents for the cluster, index, type, or a query. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-count.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-count.html[the elasticsearch docs] for more information pertaining to this method. .Get the number of all documents in the cluster [source,js] @@ -192,7 +192,7 @@ Options::: `type`:: <>, <>, <> -- A comma-separated list of types to restrict the results `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-count.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-count.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -206,7 +206,7 @@ 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. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-index_.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-index_.html[the elasticsearch docs] for more information pertaining to this method. .Create a document [source,js] @@ -265,7 +265,7 @@ Options::: `type`:: <> -- The type of the document `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-index_.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-index_.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -279,7 +279,7 @@ client.delete([params, [callback]]) Delete a typed JSON document from a specific index based on its id. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-delete.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-delete.html[the elasticsearch docs] for more information pertaining to this method. .Delete the document `/myindex/mytype/1` [source,js] @@ -329,7 +329,7 @@ Options::: `type`:: <> -- The type of the document `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-delete.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-delete.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -343,7 +343,7 @@ client.deleteByQuery([params, [callback]]) Delete documents from one or more indices and one or more types based on a query. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-delete-by-query.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-delete-by-query.html[the elasticsearch docs] for more information pertaining to this method. .Deleting documents with a simple query [source,js] @@ -459,7 +459,7 @@ Options::: `type`:: <>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-delete-by-query.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-delete-by-query.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -473,7 +473,7 @@ client.deleteScript([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -488,7 +488,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `id`:: <> -- Script ID `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-scripting.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -502,7 +502,7 @@ client.exists([params, [callback]]) Returns a boolean indicating whether or not a given document exists. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html[the elasticsearch docs] for more information pertaining to this method. .Check that the document `/myindex/mytype/1` exist [source,js] @@ -554,7 +554,7 @@ Options::: `type`:: <> -- The type of the document (use `_all` to fetch the first document matching the ID across all types) `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -568,7 +568,7 @@ client.existsSource([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -609,7 +609,7 @@ Options::: `type`:: <> -- The type of the document; use `_all` to fetch the first document matching the ID across all types `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -621,9 +621,10 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-explain.html[the elasticsearch docs] for more information pertaining to this method. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-explain.html[the elasticsearch docs] for more information pertaining to this method. .See how a document is scored against a simple query [source,js] @@ -696,7 +697,7 @@ Options::: `type`:: <> -- The type of the document `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-explain.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-explain.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -710,7 +711,7 @@ client.fieldCaps([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-field-caps.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-field-caps.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -735,7 +736,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-field-caps.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-field-caps.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -749,7 +750,7 @@ client.get([params, [callback]]) Get a typed JSON document from the index based on its id. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html[the elasticsearch docs] for more information pertaining to this method. .Get `/myindex/mytype/1` [source,js] @@ -813,7 +814,7 @@ client.getScript([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -821,6 +822,8 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc *Params* [horizontal] +`masterTimeout`:: +<> -- Specify timeout for connection to master `id`:: <> -- Script ID @@ -837,7 +840,7 @@ client.getSource([params, [callback]]) Get the source of a document by its index, type and id. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -895,7 +898,7 @@ Optimistic concurrency control is performed, when the `version` argument is spec By default, the document will be available for `get()` actions immediately, but will only be available for searching after an index refresh (which can happen automatically or manually). See <>. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-index_.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-index_.html[the elasticsearch docs] for more information pertaining to this method. .Create or update a document [source,js] @@ -958,7 +961,7 @@ Options::: `type`:: <> -- The type of the document `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-index_.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-index_.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -988,7 +991,7 @@ client.mget([params, [callback]]) Get multiple documents based on an index, type (optional) and ids. The body required by mget can take two forms: an array of document locations, or an array of document ids. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-multi-get.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-multi-get.html[the elasticsearch docs] for more information pertaining to this method. .An array of doc locations. Useful for getting documents from different indices. [source,js] @@ -1042,7 +1045,7 @@ const response = await client.mget({ `type`:: <> -- The type of the document `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-multi-get.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-multi-get.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1056,7 +1059,7 @@ client.msearch([params, [callback]]) Execute several search requests within the same request. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-multi-search.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-multi-search.html[the elasticsearch docs] for more information pertaining to this method. .Perform multiple different searches, the body is made up of meta/data pairs [source,js] @@ -1098,7 +1101,7 @@ Options::: `type`:: <>, <>, <> -- A comma-separated list of document types to use as default `body`:: -<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-multi-search.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-multi-search.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1112,7 +1115,7 @@ client.msearchTemplate([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-multi-search.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-multi-search.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1137,7 +1140,7 @@ Options::: `type`:: <>, <>, <> -- A comma-separated list of document types to use as default `body`:: -<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-multi-search.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-multi-search.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1151,7 +1154,7 @@ client.mtermvectors([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-multi-termvectors.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-multi-termvectors.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1196,7 +1199,7 @@ Options::: `type`:: <> -- The type of the document. `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-multi-termvectors.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-multi-termvectors.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1226,7 +1229,7 @@ client.putScript([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1243,7 +1246,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `id`:: <> -- Script ID `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-scripting.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1257,7 +1260,7 @@ client.rankEval([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-rank-eval.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-rank-eval.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1280,7 +1283,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-rank-eval.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-rank-eval.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1294,7 +1297,7 @@ client.reindex([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-reindex.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1315,7 +1318,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `[slices=1]`:: <> -- The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-reindex.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1329,7 +1332,7 @@ client.reindexRethrottle([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-reindex.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1342,7 +1345,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `taskId`:: <> -- The task id to rethrottle `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-reindex.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1356,7 +1359,7 @@ client.renderSearchTemplate([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-template.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-template.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1367,7 +1370,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `id`:: <> -- The id of the stored search template `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-template.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-template.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1381,7 +1384,7 @@ client.scriptsPainlessExecute([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/painless/6.3/painless-execute-api.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/painless/6.4/painless-execute-api.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1397,7 +1400,7 @@ client.scroll([params, [callback]]) Scroll a search request (retrieve the next set of results) after specifying the scroll parameter in a `search()` call. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-request-scroll.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-scroll.html[the elasticsearch docs] for more information pertaining to this method. .Collect every title in the index that contains the word "test" [source,js] @@ -1448,7 +1451,7 @@ while (responseQueue.length) { `scrollId`:: <> -- The scroll ID `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-request-scroll.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-scroll.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1466,7 +1469,7 @@ TIP: https://github.com/danpaz/bodybuilder[bodybuilder] and https://github.com/s -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-search.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-search.html[the elasticsearch docs] for more information pertaining to this method. .Search with a simple query string query [source,js] @@ -1604,7 +1607,7 @@ Options::: `type`:: <>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-search.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-search.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1618,7 +1621,7 @@ client.searchShards([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-shards.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-shards.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1647,7 +1650,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-shards.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-shards.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1661,7 +1664,7 @@ client.searchTemplate([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-template.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-template.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1706,7 +1709,7 @@ Options::: `type`:: <>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-template.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-template.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1720,7 +1723,7 @@ client.termvectors([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-termvectors.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-termvectors.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -1765,7 +1768,7 @@ Options::: `id`:: <> -- The id of the document, when not specified a doc param should be supplied. `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-termvectors.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-termvectors.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1782,7 +1785,7 @@ Update parts of a document. The required body parameter can contain one of two t * a partial document, which will be merged with the existing one. * a `script` which will update the document content -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-update.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-update.html[the elasticsearch docs] for more information pertaining to this method. .Update document title using partial document [source,js] @@ -1894,7 +1897,7 @@ Options::: `type`:: <> -- The type of the document `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-update.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-update.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -1908,7 +1911,7 @@ client.updateByQuery([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-update-by-query.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-update-by-query.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2007,7 +2010,7 @@ Options::: `type`:: <>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-update-by-query.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-update-by-query.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -2021,7 +2024,7 @@ client.cat.aliases([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2058,7 +2061,7 @@ client.cat.allocation([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-allocation.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-allocation.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2110,7 +2113,7 @@ client.cat.count([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-count.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-count.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2147,7 +2150,7 @@ client.cat.fielddata([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-fielddata.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-fielddata.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2199,7 +2202,7 @@ client.cat.health([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-health.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-health.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2236,7 +2239,7 @@ client.cat.help([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2261,7 +2264,7 @@ client.cat.indices([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-indices.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-indices.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2315,7 +2318,7 @@ client.cat.master([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-master.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-master.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2350,7 +2353,7 @@ client.cat.nodeattrs([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-nodeattrs.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-nodeattrs.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2385,7 +2388,7 @@ client.cat.nodes([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-nodes.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-nodes.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2422,7 +2425,7 @@ client.cat.pendingTasks([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-pending-tasks.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-pending-tasks.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2457,7 +2460,7 @@ client.cat.plugins([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-plugins.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-plugins.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2492,7 +2495,7 @@ client.cat.recovery([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-recovery.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-recovery.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2542,7 +2545,7 @@ client.cat.repositories([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-repositories.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-repositories.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2577,7 +2580,7 @@ client.cat.segments([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-segments.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-segments.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2625,7 +2628,7 @@ client.cat.shards([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-shards.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-shards.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2677,7 +2680,7 @@ client.cat.snapshots([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2714,7 +2717,7 @@ client.cat.tasks([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/tasks.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2753,7 +2756,7 @@ client.cat.templates([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-templates.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-templates.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2790,7 +2793,7 @@ client.cat.threadPool([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-thread-pool.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-thread-pool.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2837,7 +2840,7 @@ client.cluster.allocationExplain([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-allocation-explain.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-allocation-explain.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2850,7 +2853,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `includeDiskInfo`:: <> -- Return information about disk usage and shard sizes (default: false) `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-allocation-explain.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-allocation-explain.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -2864,7 +2867,7 @@ client.cluster.getSettings([params, [callback]]) Get cluster settings (previously set with `putSettings()`) -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-update-settings.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-update-settings.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2893,7 +2896,7 @@ client.cluster.health([params, [callback]]) Get a very simple status on the health of the cluster. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-health.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-health.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2954,7 +2957,7 @@ client.cluster.pendingTasks([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-pending.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-pending.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2979,7 +2982,7 @@ client.cluster.putSettings([params, [callback]]) Update cluster wide specific settings. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-update-settings.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-update-settings.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -2994,7 +2997,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `timeout`:: <> -- Explicit operation timeout `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-update-settings.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-update-settings.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3008,7 +3011,7 @@ client.cluster.remoteInfo([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-remote-info.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-remote-info.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3024,7 +3027,7 @@ client.cluster.reroute([params, [callback]]) Explicitly execute a cluster reroute allocation command including specific commands. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-reroute.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-reroute.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3045,7 +3048,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `timeout`:: <> -- Explicit operation timeout `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-reroute.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-reroute.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3059,7 +3062,7 @@ client.cluster.state([params, [callback]]) Get comprehensive details about the state of the whole cluster (indices settings, allocations, etc). -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-state.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-state.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3102,7 +3105,7 @@ client.cluster.stats([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-stats.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-stats.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3129,7 +3132,7 @@ client.indices.analyze([params, [callback]]) Perform the analysis process on a text and return the tokens breakdown of the text. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-analyze.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-analyze.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3139,16 +3142,8 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc [horizontal] `index`:: <> -- The name of the index to scope the operation -`preferLocal`:: -<> -- With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) -`[format=detailed]`:: -<> -- Format of the output -Options::: - * `"detailed"` - * `"text"` - `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-analyze.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-analyze.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3162,7 +3157,7 @@ client.indices.clearCache([params, [callback]]) Clear either all caches or specific cached associated with one ore more indices. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-clearcache.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-clearcache.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3197,7 +3192,7 @@ Options::: `request`:: <> -- Clear request cache `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-clearcache.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-clearcache.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3212,7 +3207,7 @@ client.indices.close([params, [callback]]) Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-open-close.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-open-close.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3239,7 +3234,7 @@ Options::: `index`:: <>, <>, <> -- A comma separated list of indices to close `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-open-close.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-open-close.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3253,7 +3248,7 @@ client.indices.create([params, [callback]]) Create an index in Elasticsearch. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-create-index.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-create-index.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3272,7 +3267,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `index`:: <> -- The name of the index `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-create-index.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-create-index.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3286,7 +3281,7 @@ client.indices.delete([params, [callback]]) Delete an index in Elasticsearch -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-delete-index.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-delete-index.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3313,7 +3308,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-delete-index.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-delete-index.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3327,7 +3322,7 @@ client.indices.deleteAlias([params, [callback]]) Delete a specific alias. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3344,7 +3339,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `name`:: <>, <>, <> -- A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3358,7 +3353,7 @@ client.indices.deleteTemplate([params, [callback]]) Delete an index template by its name. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3373,7 +3368,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `name`:: <> -- The name of the template `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3387,7 +3382,7 @@ client.indices.exists([params, [callback]]) Return a boolean indicating whether given index exists. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-exists.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-exists.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3416,7 +3411,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-exists.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-exists.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3430,7 +3425,7 @@ client.indices.existsAlias([params, [callback]]) Return a boolean indicating whether given alias exists. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3457,7 +3452,7 @@ Options::: `name`:: <>, <>, <> -- A comma-separated list of alias names to return `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3471,7 +3466,7 @@ client.indices.existsTemplate([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3488,7 +3483,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `name`:: <>, <>, <> -- The comma separated names of the index templates `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3502,7 +3497,7 @@ client.indices.existsType([params, [callback]]) Check if a type/types exists in an index/indices. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-types-exists.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-types-exists.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3529,7 +3524,7 @@ Options::: `type`:: <>, <>, <> -- A comma-separated list of document types to check `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-types-exists.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-types-exists.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3543,7 +3538,7 @@ client.indices.flush([params, [callback]]) Explicitly flush one or more indices. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-flush.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-flush.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3570,7 +3565,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names; use `_all` or empty string for all indices `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-flush.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-flush.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3584,7 +3579,7 @@ client.indices.flushSynced([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-synced-flush.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-synced-flush.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3607,7 +3602,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names; use `_all` or empty string for all indices `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-synced-flush.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-synced-flush.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3621,7 +3616,7 @@ client.indices.forcemerge([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-forcemerge.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-forcemerge.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3650,7 +3645,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-forcemerge.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-forcemerge.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3664,7 +3659,7 @@ client.indices.get([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-get-index.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-get-index.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3690,6 +3685,8 @@ Options::: <> -- Return settings in flat format (default: false) `includeDefaults`:: <> -- Whether to return all default setting for each of the indices. +`masterTimeout`:: +<> -- Specify timeout for connection to master `index`:: <>, <>, <> -- A comma-separated list of index names @@ -3705,7 +3702,7 @@ client.indices.getAlias([params, [callback]]) Retrieve a specified alias. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3744,7 +3741,7 @@ client.indices.getFieldMapping([params, [callback]]) Retrieve mapping definition of a specific field. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-get-field-mapping.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-get-field-mapping.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3787,7 +3784,7 @@ client.indices.getMapping([params, [callback]]) Retrieve mapping definition of index or index/type. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-get-mapping.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-get-mapping.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3807,6 +3804,8 @@ Options::: * `"none"` * `"all"` +`masterTimeout`:: +<> -- Specify timeout for connection to master `local`:: <> -- Return local information, do not retrieve the state from master node (default: false) `index`:: @@ -3826,7 +3825,7 @@ client.indices.getSettings([params, [callback]]) Retrieve settings for one or more (or all) indices. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-get-settings.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-get-settings.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3834,6 +3833,8 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc *Params* [horizontal] +`masterTimeout`:: +<> -- Specify timeout for connection to master `ignoreUnavailable`:: <> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) `allowNoIndices`:: @@ -3869,7 +3870,7 @@ client.indices.getTemplate([params, [callback]]) Retrieve an index template by its name. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3898,7 +3899,7 @@ client.indices.getUpgrade([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-upgrade.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-upgrade.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3933,7 +3934,7 @@ client.indices.open([params, [callback]]) Open a closed index, making it available for search. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-open-close.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-open-close.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3962,7 +3963,7 @@ Options::: `index`:: <>, <>, <> -- A comma separated list of indices to open `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-open-close.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-open-close.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -3976,7 +3977,7 @@ client.indices.putAlias([params, [callback]]) Create an alias for a specific index/indices. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -3993,7 +3994,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `name`:: <> -- The name of the alias to be created or updated `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4007,7 +4008,7 @@ client.indices.putMapping([params, [callback]]) Register specific mapping definition for a specific type. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-put-mapping.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-put-mapping.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4038,7 +4039,7 @@ Options::: `type`:: <> -- The name of the document type `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-put-mapping.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-put-mapping.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4052,7 +4053,7 @@ client.indices.putSettings([params, [callback]]) Change specific index level settings in real time. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-update-settings.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-update-settings.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4083,7 +4084,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-update-settings.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-update-settings.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4097,7 +4098,7 @@ client.indices.putTemplate([params, [callback]]) Create an index template that will automatically be applied to new indices created. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4118,7 +4119,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `name`:: <> -- The name of the template `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4132,7 +4133,7 @@ client.indices.recovery([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-recovery.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-recovery.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4159,7 +4160,7 @@ client.indices.refresh([params, [callback]]) Explicitly refresh one or more index, making all operations performed since the last refresh available for search. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-refresh.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-refresh.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4182,7 +4183,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-refresh.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-refresh.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4196,7 +4197,7 @@ client.indices.rollover([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-rollover-index.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-rollover-index.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4217,7 +4218,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `newIndex`:: <> -- The name of the rollover index `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-rollover-index.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-rollover-index.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4231,7 +4232,7 @@ client.indices.segments([params, [callback]]) Retrieve low level segments information that a Lucene index (shard level) is built with. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-segments.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-segments.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4268,7 +4269,7 @@ client.indices.shardStores([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-shards-stores.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-shards-stores.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4305,7 +4306,7 @@ client.indices.shrink([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-shrink-index.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-shrink-index.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4313,6 +4314,8 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc *Params* [horizontal] +`copySettings`:: +<> -- whether or not to copy settings from the source index (defaults to false) `timeout`:: <> -- Explicit operation timeout `masterTimeout`:: @@ -4324,7 +4327,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `target`:: <> -- The name of the target index to shrink into `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-shrink-index.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-shrink-index.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4338,7 +4341,7 @@ client.indices.split([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-split-index.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-split-index.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4346,6 +4349,8 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc *Params* [horizontal] +`copySettings`:: +<> -- whether or not to copy settings from the source index (defaults to false) `timeout`:: <> -- Explicit operation timeout `masterTimeout`:: @@ -4357,7 +4362,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `target`:: <> -- The name of the target index to split into `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-split-index.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-split-index.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4371,7 +4376,7 @@ client.indices.stats([params, [callback]]) Retrieve statistics on different operations happening on an index. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-stats.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-stats.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4415,7 +4420,7 @@ client.indices.updateAliases([params, [callback]]) Update specified aliases. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. .Perform an atomic alias swap, for a rotating index [source,js] @@ -4440,7 +4445,7 @@ const response = await client.indices.updateAliases({ `masterTimeout`:: <> -- Specify timeout for connection to master `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4454,7 +4459,7 @@ client.indices.upgrade([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-upgrade.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-upgrade.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4481,7 +4486,7 @@ Options::: `index`:: <>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-upgrade.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-upgrade.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4495,7 +4500,7 @@ client.indices.validateQuery([params, [callback]]) Validate a potentially expensive query without executing it. -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-validate.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-validate.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4542,7 +4547,7 @@ Options::: `type`:: <>, <>, <> -- A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-validate.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-validate.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4556,7 +4561,7 @@ client.ingest.deletePipeline([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4571,7 +4576,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `id`:: <> -- Pipeline ID `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4585,7 +4590,7 @@ client.ingest.getPipeline([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4610,7 +4615,7 @@ client.ingest.processorGrok([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4626,7 +4631,7 @@ client.ingest.putPipeline([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4641,7 +4646,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `id`:: <> -- Pipeline ID `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4655,7 +4660,7 @@ client.ingest.simulate([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4668,7 +4673,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `id`:: <> -- Pipeline ID `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4682,7 +4687,7 @@ client.nodes.hotThreads([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-nodes-hot-threads.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-nodes-hot-threads.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4722,7 +4727,7 @@ client.nodes.info([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-nodes-info.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-nodes-info.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4741,6 +4746,33 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc link:#[back to top] +[[api-nodes-reloadsecuresettings]] +=== `nodes.reloadSecureSettings` + +[source,js] +-------- +client.nodes.reloadSecureSettings([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/secure-settings.html#reloadable-secure-settings[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/secure-settings.html#reloadable-secure-settings[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + [[api-nodes-stats]] === `nodes.stats` @@ -4751,7 +4783,7 @@ client.nodes.stats([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-nodes-stats.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-nodes-stats.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4799,7 +4831,7 @@ client.nodes.usage([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-nodes-usage.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-nodes-usage.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4826,7 +4858,7 @@ client.snapshot.create([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4843,7 +4875,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `snapshot`:: <> -- A snapshot name `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4857,7 +4889,7 @@ client.snapshot.createRepository([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4874,7 +4906,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `repository`:: <> -- A repository name `body`:: -<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4888,7 +4920,7 @@ client.snapshot.delete([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4903,7 +4935,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `snapshot`:: <> -- A snapshot name `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4917,7 +4949,7 @@ client.snapshot.deleteRepository([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4932,7 +4964,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `repository`:: <>, <>, <> -- A comma-separated list of repository names `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -4946,7 +4978,7 @@ client.snapshot.get([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -4977,7 +5009,7 @@ client.snapshot.getRepository([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -5004,7 +5036,7 @@ client.snapshot.restore([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -5021,7 +5053,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `snapshot`:: <> -- A snapshot name `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -5035,7 +5067,7 @@ client.snapshot.status([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -5064,7 +5096,7 @@ client.snapshot.verifyRepository([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -5079,7 +5111,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `repository`:: <> -- A repository name `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -5093,7 +5125,7 @@ client.tasks.cancel([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/tasks.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -5110,7 +5142,7 @@ Check the *<>* and https://www.elastic.co/guide/en/elasticsearc `taskId`:: <> -- Cancel the task with specified task id (node_id:task_number) `body`:: -<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for details about what can be specified here. +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.4/tasks.html[the elasticsearch docs] for details about what can be specified here. link:#[back to top] @@ -5124,7 +5156,7 @@ client.tasks.get([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/tasks.html[the elasticsearch docs] for more information pertaining to this method. // no examples @@ -5151,7 +5183,7 @@ client.tasks.list([params, [callback]]) // no description -Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for more information pertaining to this method. +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.4/tasks.html[the elasticsearch docs] for more information pertaining to this method. // no examples diff --git a/docs/api_methods_0_90.asciidoc b/docs/api_methods_0_90.asciidoc index a74659255..327885259 100644 --- a/docs/api_methods_0_90.asciidoc +++ b/docs/api_methods_0_90.asciidoc @@ -455,7 +455,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/0.90/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_1_7.asciidoc b/docs/api_methods_1_7.asciidoc index c3a7ed40c..7a8c6fced 100644 --- a/docs/api_methods_1_7.asciidoc +++ b/docs/api_methods_1_7.asciidoc @@ -616,7 +616,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_2_4.asciidoc b/docs/api_methods_2_4.asciidoc index acba36d67..5ba2b3343 100644 --- a/docs/api_methods_2_4.asciidoc +++ b/docs/api_methods_2_4.asciidoc @@ -511,7 +511,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_0.asciidoc b/docs/api_methods_5_0.asciidoc index 14376d928..fa3f4f7fc 100644 --- a/docs/api_methods_5_0.asciidoc +++ b/docs/api_methods_5_0.asciidoc @@ -634,7 +634,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_1.asciidoc b/docs/api_methods_5_1.asciidoc index 68c64b07c..cc68e7604 100644 --- a/docs/api_methods_5_1.asciidoc +++ b/docs/api_methods_5_1.asciidoc @@ -632,7 +632,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.1/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_2.asciidoc b/docs/api_methods_5_2.asciidoc index b35211af0..8870ec552 100644 --- a/docs/api_methods_5_2.asciidoc +++ b/docs/api_methods_5_2.asciidoc @@ -632,7 +632,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_3.asciidoc b/docs/api_methods_5_3.asciidoc index 56016abea..74abf7749 100644 --- a/docs/api_methods_5_3.asciidoc +++ b/docs/api_methods_5_3.asciidoc @@ -632,7 +632,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.3/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_4.asciidoc b/docs/api_methods_5_4.asciidoc index 28685627e..d6f6f63c5 100644 --- a/docs/api_methods_5_4.asciidoc +++ b/docs/api_methods_5_4.asciidoc @@ -705,7 +705,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_5.asciidoc b/docs/api_methods_5_5.asciidoc index beaeae55b..537dc03d1 100644 --- a/docs/api_methods_5_5.asciidoc +++ b/docs/api_methods_5_5.asciidoc @@ -705,7 +705,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_6.asciidoc b/docs/api_methods_5_6.asciidoc index 1fff9158e..0b5343bd9 100644 --- a/docs/api_methods_5_6.asciidoc +++ b/docs/api_methods_5_6.asciidoc @@ -711,7 +711,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_6_0.asciidoc b/docs/api_methods_6_0.asciidoc index 13dbf181e..23911237e 100644 --- a/docs/api_methods_6_0.asciidoc +++ b/docs/api_methods_6_0.asciidoc @@ -621,7 +621,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_6_1.asciidoc b/docs/api_methods_6_1.asciidoc index 052171fff..20730cfd6 100644 --- a/docs/api_methods_6_1.asciidoc +++ b/docs/api_methods_6_1.asciidoc @@ -621,7 +621,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_6_2.asciidoc b/docs/api_methods_6_2.asciidoc index 102554ca6..caa1be533 100644 --- a/docs/api_methods_6_2.asciidoc +++ b/docs/api_methods_6_2.asciidoc @@ -621,7 +621,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_6_3.asciidoc b/docs/api_methods_6_3.asciidoc new file mode 100644 index 000000000..d42aaae12 --- /dev/null +++ b/docs/api_methods_6_3.asciidoc @@ -0,0 +1,5183 @@ +[[api-reference-6-3]] +== 6.3 API + + +NOTE: At this time, you must opt into the 6.3 API by setting the `apiVersion` config parameter. + + +[[api-bulk-6-3]] +=== `bulk` + +[source,js] +-------- +client.bulk([params, [callback]]) +-------- + +Perform many index/delete operations in a single API call. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-bulk.html[the elasticsearch docs] for more information pertaining to this method. + +.Perform three operations in a single request +[source,js] +--------- +client.bulk({ + body: [ + // action description + { index: { _index: 'myindex', _type: 'mytype', _id: 1 } }, + // the document to index + { title: 'foo' }, + // action description + { update: { _index: 'myindex', _type: 'mytype', _id: 2 } }, + // the document to update + { doc: { title: 'foo' } }, + // action description + { delete: { _index: 'myindex', _type: 'mytype', _id: 3 } }, + // no document needed for this delete + ] +}, function (err, resp) { + // ... +}); +--------- + + +*Params* + +[horizontal] +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the bulk 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) +`refresh`:: +<> -- If `true` then refresh the effected 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`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`type`:: +<> -- Default document type for items which don't provide one +`fields`:: +<>, <>, <> -- Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request +`_sourceExclude`:: +<>, <>, <> -- Default list of fields to exclude from the returned _source field, can be overridden on each sub-request +`_sourceInclude`:: +<>, <>, <> -- Default list of fields to extract and return from the _source field, can be overridden on each sub-request +`pipeline`:: +<> -- The pipeline id to preprocess incoming documents with +`index`:: +<> -- Default index for items which don't provide one +`body`:: +<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-bulk.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-clearscroll-6-3]] +=== `clearScroll` + +[source,js] +-------- +client.clearScroll([params, [callback]]) +-------- + +Clear the scroll request created by specifying the scroll parameter to search. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-request-scroll.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`scrollId`:: +<>, <>, <> -- A comma-separated list of scroll IDs to clear +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-request-scroll.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-count-6-3]] +=== `count` + +[source,js] +-------- +client.count([params, [callback]]) +-------- + +Get the number of documents for the cluster, index, type, or a query. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-count.html[the elasticsearch docs] for more information pertaining to this method. + +.Get the number of all documents in the cluster +[source,js] +--------- +const { count } = await client.count(); +--------- + +.Get the number of documents in an index +[source,js] +--------- +const { count } = await client.count({ + index: 'index_name' +}); +--------- + +.Get the number of documents matching a query +[source,js] +--------- +const { count } = await client.count({ + index: 'index_name', + body: { + query: { + filtered: { + filter: { + terms: { + foo: ['bar'] + } + } + } + } + } +}); +--------- + + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`minScore`:: +<> -- Include only documents with a specific `_score` value in the result +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`q`:: +<> -- Query in the Lucene query string syntax +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`terminateAfter`:: +<> -- The maximum count for each shard, upon reaching which the query execution will terminate early +`index`:: +<>, <>, <> -- A comma-separated list of indices to restrict the results +`type`:: +<>, <>, <> -- A comma-separated list of types to restrict the results +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-count.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-create-6-3]] +=== `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. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-index_.html[the elasticsearch docs] for more information pertaining to this method. + +.Create a document +[source,js] +--------- +await client.create({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + title: 'Test 1', + tags: ['y', 'z'], + published: true, + published_at: '2013-01-01', + counter: 1 + } +}); +--------- + + + +*Params* + +[horizontal] +`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) +`parent`:: +<> -- ID of the parent document +`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. +Options::: + * `"true"` + * `"false"` + * `"wait_for"` + * `""` + +`routing`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`pipeline`:: +<> -- The pipeline id to preprocess incoming documents with +`id`:: +<> -- Document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-index_.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-delete-6-3]] +=== `delete` + +[source,js] +-------- +client.delete([params, [callback]]) +-------- + +Delete a typed JSON document from a specific index based on its id. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-delete.html[the elasticsearch docs] for more information pertaining to this method. + +.Delete the document `/myindex/mytype/1` +[source,js] +--------- +await client.delete({ + index: 'myindex', + type: 'mytype', + id: '1' +}); +--------- + + + +*Params* + +[horizontal] +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the delete 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`:: +<> -- ID of parent document +`refresh`:: +<> -- If `true` then refresh the effected 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`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-delete.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-deletebyquery-6-3]] +=== `deleteByQuery` + +[source,js] +-------- +client.deleteByQuery([params, [callback]]) +-------- + +Delete documents from one or more indices and one or more types based on a query. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-delete-by-query.html[the elasticsearch docs] for more information pertaining to this method. + +.Deleting documents with a simple query +[source,js] +--------- +await client.deleteByQuery({ + index: 'myindex', + q: 'test' +}); +--------- + +.Deleting documents using the Query DSL +[source,js] +--------- +await client.deleteByQuery({ + index: 'posts', + body: { + query: { + term: { published: false } + } + } +}); +--------- + + + +*Params* + +[horizontal] +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`from`:: +<> -- Starting offset (default: 0) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[conflicts=abort]`:: +<> -- What to do when the delete by query hits version conflicts? +Options::: + * `"abort"` + * `"proceed"` + +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`q`:: +<> -- Query in the Lucene query string syntax +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"dfs_query_then_fetch"` + +`searchTimeout`:: +<> -- Explicit timeout for each search request. Defaults to no timeout. +`size`:: +<> -- Number of hits to return (default: 10) +`sort`:: +<>, <>, <> -- A comma-separated list of : pairs +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`terminateAfter`:: +<> -- The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +`stats`:: +<>, <>, <> -- Specific 'tag' of the request for logging and statistical purposes +`version`:: +<> -- Specify whether to return document version as part of a hit +`requestCache`:: +<> -- Specify if request cache should be used for this request or not, defaults to index level setting +`refresh`:: +<> -- Should the effected indexes be refreshed? +`[timeout=1m]`:: +<> -- Time each individual bulk request should wait for shards that are unavailable. +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the delete by query 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) +`scrollSize`:: +<> -- Size on the scroll request powering the delete by query +`[waitForCompletion=true]`:: +<> -- Should the request should block until the delete by query is complete. +`requestsPerSecond`:: +<> -- The throttle for this request in sub-requests per second. -1 means no throttle. +`[slices=1]`:: +<> -- The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-delete-by-query.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-deletescript-6-3]] +=== `deleteScript` + +[source,js] +-------- +client.deleteScript([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`id`:: +<> -- Script ID +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-exists-6-3]] +=== `exists` + +[source,js] +-------- +client.exists([params, [callback]]) +-------- + +Returns a boolean indicating whether or not a given document exists. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for more information pertaining to this method. + +.Check that the document `/myindex/mytype/1` exist +[source,js] +--------- +const exists = await client.exists({ + index: 'myindex', + type: 'mytype', + id: 1 +}); +--------- + + + +*Params* + +[horizontal] +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return in the response +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document (use `_all` to fetch the first document matching the ID across all types) +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-existssource-6-3]] +=== `existsSource` + +[source,js] +-------- +client.existsSource([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document; use `_all` to fetch the first document matching the ID across all types +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-explain-6-3]] +=== `explain` + +[source,js] +-------- +client.explain([params, [callback]]) +-------- + +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-explain.html[the elasticsearch docs] for more information pertaining to this method. + +.See how a document is scored against a simple query +[source,js] +--------- +const response = await client.explain({ + // the document to test + index: 'myindex', + type: 'mytype', + id: '1', + + // the query to score it against + q: 'field:value' +}); +--------- + +.See how a document is scored against a query written in the Query DSL +[source,js] +--------- +const response = await client.explain({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + query: { + match: { title: 'test' } + } + } +}); +--------- + + + +*Params* + +[horizontal] +`analyzeWildcard`:: +<> -- Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) +`analyzer`:: +<> -- The analyzer for the query string query +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The default field for query string query (default: _all) +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return in the response +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`q`:: +<> -- Query in the Lucene query string syntax +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-explain.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-fieldcaps-6-3]] +=== `fieldCaps` + +[source,js] +-------- +client.fieldCaps([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-field-caps.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`fields`:: +<>, <>, <> -- A comma-separated list of field names +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-field-caps.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-get-6-3]] +=== `get` + +[source,js] +-------- +client.get([params, [callback]]) +-------- + +Get a typed JSON document from the index based on its id. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for more information pertaining to this method. + +.Get `/myindex/mytype/1` +[source,js] +--------- +const response = await client.get({ + index: 'myindex', + type: 'mytype', + id: 1 +}); +--------- + + + +*Params* + +[horizontal] +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return in the response +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document (use `_all` to fetch the first document matching the ID across all types) + +link:#[back to top] + +[[api-getscript-6-3]] +=== `getScript` + +[source,js] +-------- +client.getScript([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`id`:: +<> -- Script ID + +link:#[back to top] + +[[api-getsource-6-3]] +=== `getSource` + +[source,js] +-------- +client.getSource([params, [callback]]) +-------- + +Get the source of a document by its index, type and id. + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-get.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document; use `_all` to fetch the first document matching the ID across all types + +link:#[back to top] + +[[api-index-6-3]] +=== `index` + +[source,js] +-------- +client.index([params, [callback]]) +-------- + +Stores a typed JSON document in an index, making it searchable. When the `id` param is not set, a unique id will be auto-generated. When you specify an `id` either a new document will be created, or an existing document will be updated. To enforce "put-if-absent" behavior set the `opType` to `"create"` or use the `create()` method. + +Optimistic concurrency control is performed, when the `version` argument is specified. By default, no version checks are performed. + +By default, the document will be available for `get()` actions immediately, but will only be available for searching after an index refresh (which can happen automatically or manually). See <>. + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-index_.html[the elasticsearch docs] for more information pertaining to this method. + +.Create or update a document +[source,js] +--------- +const response = await client.index({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + title: 'Test 1', + tags: ['y', 'z'], + published: true, + } +}); +--------- + + + +*Params* + +[horizontal] +`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) +`[opType=index]`:: +<> -- Explicit operation type +Options::: + * `"index"` + * `"create"` + +`parent`:: +<> -- ID of the parent document +`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. +Options::: + * `"true"` + * `"false"` + * `"wait_for"` + * `""` + +`routing`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`pipeline`:: +<> -- The pipeline id to preprocess incoming documents with +`id`:: +<> -- Document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-index_.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-info-6-3]] +=== `info` + +[source,js] +-------- +client.info([params, [callback]]) +-------- + +Get basic info from the current cluster. + +Check the *<>* and http://www.elastic.co/guide/[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-mget-6-3]] +=== `mget` + +[source,js] +-------- +client.mget([params, [callback]]) +-------- + +Get multiple documents based on an index, type (optional) and ids. The body required by mget can take two forms: an array of document locations, or an array of document ids. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-multi-get.html[the elasticsearch docs] for more information pertaining to this method. + +.An array of doc locations. Useful for getting documents from different indices. +[source,js] +--------- +const response = await client.mget({ + body: { + docs: [ + { _index: 'indexA', _type: 'typeA', _id: '1' }, + { _index: 'indexB', _type: 'typeB', _id: '1' }, + { _index: 'indexC', _type: 'typeC', _id: '1' } + ] + } +}); +--------- + +.An array of ids. You must also specify the `index` and `type` that apply to all of the ids. +[source,js] +--------- +const response = await client.mget({ + index: 'myindex', + type: 'mytype', + body: { + ids: [1, 2, 3] + } +}); +--------- + + + +*Params* + +[horizontal] +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return in the response +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-multi-get.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-msearch-6-3]] +=== `msearch` + +[source,js] +-------- +client.msearch([params, [callback]]) +-------- + +Execute several search requests within the same request. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-multi-search.html[the elasticsearch docs] for more information pertaining to this method. + +.Perform multiple different searches, the body is made up of meta/data pairs +[source,js] +--------- +const response = await client.msearch({ + body: [ + // match all query, on all indices and types + {}, + { query: { match_all: {} } }, + + // query_string query, on index/mytype + { index: 'myindex', type: 'mytype' }, + { query: { query_string: { query: '"Test 1"' } } } + ] +}); +--------- + + + +*Params* + +[horizontal] +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"query_and_fetch"` + * `"dfs_query_then_fetch"` + * `"dfs_query_and_fetch"` + +`maxConcurrentSearches`:: +<> -- Controls the maximum number of concurrent searches the multi search api will execute +`typedKeys`:: +<> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response +`[preFilterShardSize=128]`:: +<> -- A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. +`index`:: +<>, <>, <> -- A comma-separated list of index names to use as default +`type`:: +<>, <>, <> -- A comma-separated list of document types to use as default +`body`:: +<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-multi-search.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-msearchtemplate-6-3]] +=== `msearchTemplate` + +[source,js] +-------- +client.msearchTemplate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-multi-search.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"query_and_fetch"` + * `"dfs_query_then_fetch"` + * `"dfs_query_and_fetch"` + +`typedKeys`:: +<> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response +`maxConcurrentSearches`:: +<> -- Controls the maximum number of concurrent searches the multi search api will execute +`index`:: +<>, <>, <> -- A comma-separated list of index names to use as default +`type`:: +<>, <>, <> -- A comma-separated list of document types to use as default +`body`:: +<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-multi-search.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-mtermvectors-6-3]] +=== `mtermvectors` + +[source,js] +-------- +client.mtermvectors([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-multi-termvectors.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ids`:: +<>, <>, <> -- A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body +`termStatistics`:: +<> -- Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`[fieldStatistics=true]`:: +<> -- Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`fields`:: +<>, <>, <> -- A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`[offsets=true]`:: +<> -- Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`[positions=true]`:: +<> -- Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`[payloads=true]`:: +<> -- Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". +`routing`:: +<> -- Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`parent`:: +<> -- Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`realtime`:: +<> -- Specifies if requests are real-time as opposed to near-real-time (default: true). +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`index`:: +<> -- The index in which the document resides. +`type`:: +<> -- The type of the document. +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-multi-termvectors.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-ping-6-3]] +=== `ping` + +[source,js] +-------- +client.ping([params, [callback]]) +-------- + +// no description + +Check the *<>* and http://www.elastic.co/guide/[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-putscript-6-3]] +=== `putScript` + +[source,js] +-------- +client.putScript([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`context`:: +<> -- Script context +`id`:: +<> -- Script ID +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-scripting.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-rankeval-6-3]] +=== `rankEval` + +[source,js] +-------- +client.rankEval([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-rank-eval.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-rank-eval.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-reindex-6-3]] +=== `reindex` + +[source,js] +-------- +client.reindex([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`refresh`:: +<> -- Should the effected indexes be refreshed? +`[timeout=1m]`:: +<> -- Time each individual bulk request should wait for shards that are unavailable. +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the reindex 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) +`[waitForCompletion=true]`:: +<> -- Should the request should block until the reindex is complete. +`requestsPerSecond`:: +<> -- The throttle to set on this request in sub-requests per second. -1 means no throttle. +`[slices=1]`:: +<> -- The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-reindexrethrottle-6-3]] +=== `reindexRethrottle` + +[source,js] +-------- +client.reindexRethrottle([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`requestsPerSecond`:: +<> -- The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. +`taskId`:: +<> -- The task id to rethrottle +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-reindex.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-rendersearchtemplate-6-3]] +=== `renderSearchTemplate` + +[source,js] +-------- +client.renderSearchTemplate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-template.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`id`:: +<> -- The id of the stored search template +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-template.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-scriptspainlessexecute-6-3]] +=== `scriptsPainlessExecute` + +[source,js] +-------- +client.scriptsPainlessExecute([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/painless/6.3/painless-execute-api.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-scroll-6-3]] +=== `scroll` + +[source,js] +-------- +client.scroll([params, [callback]]) +-------- + +Scroll a search request (retrieve the next set of results) after specifying the scroll parameter in a `search()` call. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-request-scroll.html[the elasticsearch docs] for more information pertaining to this method. + +.Collect every title in the index that contains the word "test" +[source,js] +--------- +const allTitles = []; +const responseQueue = []; + +// start things off by searching, setting a scroll timeout, and pushing +// our first response into the queue to be processed +await client.search({ + index: 'myindex', + scroll: '30s', // keep the search results "scrollable" for 30 seconds + source: ['title'], // filter the source to only include the title field + q: 'title:test' +}) + +while (responseQueue.length) { + const response = responseQueue.shift(); + + // collect the titles from this response + response.hits.hits.forEach(function (hit) { + allTitles.push(hit.fields.title); + }); + + // check to see if we have collected all of the titles + if (response.hits.total === allTitles.length) { + console.log('every "test" title', allTitles); + break + } + + // get the next response if there are more titles to fetch + responseQueue.push( + await client.scroll({ + scrollId: response._scroll_id, + scroll: '30s' + }) + ); +} +--------- + + + +*Params* + +[horizontal] +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`scrollId`:: +<> -- The scroll ID +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-request-scroll.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-search-6-3]] +=== `search` + +[source,js] +-------- +client.search([params, [callback]]) +-------- + +Return documents matching a query, aggregations/facets, highlighted snippets, suggestions, and more. Write your queries as either http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-uri-request.html[simple query strings] in the `q` parameter, or by specifying a http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-body.html[full request definition] using the http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html[Elasticsearch Query DSL] in the `body` parameter. + +TIP: https://github.com/danpaz/bodybuilder[bodybuilder] and https://github.com/sudo-suhas/elastic-builder[elastic-builder] can be used to make building query bodies easier. + + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-search.html[the elasticsearch docs] for more information pertaining to this method. + +.Search with a simple query string query +[source,js] +--------- +const response = await client.search({ + index: 'myindex', + q: 'title:test' +}); +--------- + +.Passing a full request definition in the Elasticsearch's Query DSL as a `Hash` +[source,js] +--------- +const response = await client.search({ + index: 'myindex', + body: { + query: { + match: { + title: 'test' + } + }, + facets: { + tags: { + terms: { + field: 'tags' + } + } + } + } +}); +--------- + + + +*Params* + +[horizontal] +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`explain`:: +<> -- Specify whether to return detailed information about score computation as part of a hit +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return as part of a hit +`docvalueFields`:: +<>, <>, <> -- A comma-separated list of fields to return as the docvalue representation of a field for each hit +`from`:: +<> -- Starting offset (default: 0) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`q`:: +<> -- Query in the Lucene query string syntax +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"dfs_query_then_fetch"` + +`size`:: +<> -- Number of hits to return (default: 10) +`sort`:: +<>, <>, <> -- A comma-separated list of : pairs +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`terminateAfter`:: +<> -- The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +`stats`:: +<>, <>, <> -- Specific 'tag' of the request for logging and statistical purposes +`suggestField`:: +<> -- Specify which field to use for suggestions +`[suggestMode=missing]`:: +<> -- Specify suggest mode +Options::: + * `"missing"` + * `"popular"` + * `"always"` + +`suggestSize`:: +<> -- How many suggestions to return in response +`suggestText`:: +<> -- The source text for which the suggestions should be returned +`timeout`:: +<> -- Explicit operation timeout +`trackScores`:: +<> -- Whether to calculate and return scores even if they are not used for sorting +`trackTotalHits`:: +<> -- Indicate if the number of documents that match the query should be tracked +`[allowPartialSearchResults=true]`:: +<> -- Indicate if an error should be returned if there is a partial search failure or timeout +`typedKeys`:: +<> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response +`version`:: +<> -- Specify whether to return document version as part of a hit +`requestCache`:: +<> -- Specify if request cache should be used for this request or not, defaults to index level setting +`[batchedReduceSize=512]`:: +<> -- The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. +`[maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.]`:: +<> -- The number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests +`[preFilterShardSize=128]`:: +<> -- A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-search.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-searchshards-6-3]] +=== `searchShards` + +[source,js] +-------- +client.searchShards([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-shards.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +<> -- Specific routing value +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-shards.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-searchtemplate-6-3]] +=== `searchTemplate` + +[source,js] +-------- +client.searchTemplate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-template.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"query_and_fetch"` + * `"dfs_query_then_fetch"` + * `"dfs_query_and_fetch"` + +`explain`:: +<> -- Specify whether to return detailed information about score computation as part of a hit +`profile`:: +<> -- Specify whether to profile the query execution +`typedKeys`:: +<> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-template.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-termvectors-6-3]] +=== `termvectors` + +[source,js] +-------- +client.termvectors([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-termvectors.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`termStatistics`:: +<> -- Specifies if total term frequency and document frequency should be returned. +`[fieldStatistics=true]`:: +<> -- Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. +`fields`:: +<>, <>, <> -- A comma-separated list of fields to return. +`[offsets=true]`:: +<> -- Specifies if term offsets should be returned. +`[positions=true]`:: +<> -- Specifies if term positions should be returned. +`[payloads=true]`:: +<> -- Specifies if term payloads should be returned. +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random). +`routing`:: +<> -- Specific routing value. +`parent`:: +<> -- Parent id of documents. +`realtime`:: +<> -- Specifies if request is real-time as opposed to near-real-time (default: true). +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`index`:: +<> -- The index in which the document resides. +`type`:: +<> -- The type of the document. +`id`:: +<> -- The id of the document, when not specified a doc param should be supplied. +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-termvectors.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-update-6-3]] +=== `update` + +[source,js] +-------- +client.update([params, [callback]]) +-------- + +Update parts of a document. The required body parameter can contain one of two things: + + * a partial document, which will be merged with the existing one. + * a `script` which will update the document content + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-update.html[the elasticsearch docs] for more information pertaining to this method. + +.Update document title using partial document +[source,js] +--------- +const response = await client.update({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + // put the partial document under the `doc` key + doc: { + title: 'Updated' + } + } +}) +--------- + +.Add a tag to document `tags` property using a `script` +[source,js] +--------- +const response = await client.update({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + script: 'ctx._source.tags += tag', + params: { tag: 'some new tag' } + } +}); +--------- + +.Increment a document counter by 1 or initialize it, when the document does not exist +[source,js] +--------- +const response = await client.update({ + index: 'myindex', + type: 'mytype', + id: '777', + body: { + script: 'ctx._source.counter += 1', + upsert: { + counter: 1 + } + } +}) +--------- + +.Delete a document if it's tagged “to-delete” +[source,js] +--------- +const response = await client.update({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + script: 'ctx._source.tags.contains(tag) ? ctx.op = "delete" : ctx.op = "none"', + params: { + tag: 'to-delete' + } + } +}); +--------- + + + +*Params* + +[horizontal] +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the update 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) +`fields`:: +<>, <>, <> -- A comma-separated list of fields to return in the response +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`lang`:: +<> -- The script language (default: painless) +`parent`:: +<> -- ID of the parent document. Is is only used for routing and when for the upsert request +`refresh`:: +<> -- If `true` then refresh the effected 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"` + * `""` + +`retryOnConflict`:: +<> -- Specify how many times should the operation be retried when a conflict occurs (default: 0) +`routing`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"force"` + +`id`:: +<> -- Document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-update.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-updatebyquery-6-3]] +=== `updateByQuery` + +[source,js] +-------- +client.updateByQuery([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-update-by-query.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`from`:: +<> -- Starting offset (default: 0) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[conflicts=abort]`:: +<> -- What to do when the update by query hits version conflicts? +Options::: + * `"abort"` + * `"proceed"` + +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`pipeline`:: +<> -- Ingest pipeline to set on index requests made by this action. (default: none) +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`q`:: +<> -- Query in the Lucene query string syntax +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"dfs_query_then_fetch"` + +`searchTimeout`:: +<> -- Explicit timeout for each search request. Defaults to no timeout. +`size`:: +<> -- Number of hits to return (default: 10) +`sort`:: +<>, <>, <> -- A comma-separated list of : pairs +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`terminateAfter`:: +<> -- The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +`stats`:: +<>, <>, <> -- Specific 'tag' of the request for logging and statistical purposes +`version`:: +<> -- Specify whether to return document version as part of a hit +`versionType`:: +<> -- Should the document increment the version number (internal) on hit or not (reindex) +`requestCache`:: +<> -- Specify if request cache should be used for this request or not, defaults to index level setting +`refresh`:: +<> -- Should the effected indexes be refreshed? +`[timeout=1m]`:: +<> -- Time each individual bulk request should wait for shards that are unavailable. +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the update by query 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) +`scrollSize`:: +<> -- Size on the scroll request powering the update by query +`[waitForCompletion=true]`:: +<> -- Should the request should block until the update by query operation is complete. +`requestsPerSecond`:: +<> -- The throttle to set on this request in sub-requests per second. -1 means no throttle. +`[slices=1]`:: +<> -- The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/docs-update-by-query.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-cat-aliases-6-3]] +=== `cat.aliases` + +[source,js] +-------- +client.cat.aliases([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`name`:: +<>, <>, <> -- A comma-separated list of alias names to return + +link:#[back to top] + +[[api-cat-allocation-6-3]] +=== `cat.allocation` + +[source,js] +-------- +client.cat.allocation([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-allocation.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information + +link:#[back to top] + +[[api-cat-count-6-3]] +=== `cat.count` + +[source,js] +-------- +client.cat.count([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-count.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-fielddata-6-3]] +=== `cat.fielddata` + +[source,js] +-------- +client.cat.fielddata([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-fielddata.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`fields`:: +<>, <>, <> -- A comma-separated list of fields to return the fielddata size + +link:#[back to top] + +[[api-cat-health-6-3]] +=== `cat.health` + +[source,js] +-------- +client.cat.health([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-health.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`[ts=true]`:: +<> -- Set to false to disable timestamping +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-help-6-3]] +=== `cat.help` + +[source,js] +-------- +client.cat.help([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by + +link:#[back to top] + +[[api-cat-indices-6-3]] +=== `cat.indices` + +[source,js] +-------- +client.cat.indices([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-indices.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"m"` + * `"g"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`health`:: +<> -- A health status ("green", "yellow", or "red" to filter only indices matching the specified health status +Options::: + * `"green"` + * `"yellow"` + * `"red"` + +`help`:: +<> -- Return help information +`pri`:: +<> -- Set to true to return stats only for primary shards +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-master-6-3]] +=== `cat.master` + +[source,js] +-------- +client.cat.master([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-master.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-nodeattrs-6-3]] +=== `cat.nodeattrs` + +[source,js] +-------- +client.cat.nodeattrs([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-nodeattrs.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-nodes-6-3]] +=== `cat.nodes` + +[source,js] +-------- +client.cat.nodes([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-nodes.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`fullId`:: +<> -- Return the full node ID instead of the shortened version (default: false) +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-pendingtasks-6-3]] +=== `cat.pendingTasks` + +[source,js] +-------- +client.cat.pendingTasks([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-pending-tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-plugins-6-3]] +=== `cat.plugins` + +[source,js] +-------- +client.cat.plugins([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-plugins.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-recovery-6-3]] +=== `cat.recovery` + +[source,js] +-------- +client.cat.recovery([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-recovery.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-repositories-6-3]] +=== `cat.repositories` + +[source,js] +-------- +client.cat.repositories([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-repositories.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-segments-6-3]] +=== `cat.segments` + +[source,js] +-------- +client.cat.segments([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-segments.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-shards-6-3]] +=== `cat.shards` + +[source,js] +-------- +client.cat.shards([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-shards.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-snapshots-6-3]] +=== `cat.snapshots` + +[source,js] +-------- +client.cat.snapshots([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`ignoreUnavailable`:: +<> -- Set to true to ignore unavailable snapshots +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`repository`:: +<>, <>, <> -- Name of repository from which to fetch the snapshot information + +link:#[back to top] + +[[api-cat-tasks-6-3]] +=== `cat.tasks` + +[source,js] +-------- +client.cat.tasks([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +`actions`:: +<>, <>, <> -- A comma-separated list of actions that should be returned. Leave empty to return all. +`detailed`:: +<> -- Return detailed task information (default: false) +`parentTask`:: +<> -- Return tasks with specified parent task id. Set to -1 to return all. +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-templates-6-3]] +=== `cat.templates` + +[source,js] +-------- +client.cat.templates([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`name`:: +<> -- A pattern that returned template names must match + +link:#[back to top] + +[[api-cat-threadpool-6-3]] +=== `cat.threadPool` + +[source,js] +-------- +client.cat.threadPool([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cat-thread-pool.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`size`:: +<> -- The multiplier in which to display values +Options::: + * `""` + * `"k"` + * `"m"` + * `"g"` + * `"t"` + * `"p"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`threadPoolPatterns`:: +<>, <>, <> -- A comma-separated list of regular-expressions to filter the thread pools in the output + +link:#[back to top] + +[[api-cluster-allocationexplain-6-3]] +=== `cluster.allocationExplain` + +[source,js] +-------- +client.cluster.allocationExplain([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-allocation-explain.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`includeYesDecisions`:: +<> -- Return 'YES' decisions in explanation (default: false) +`includeDiskInfo`:: +<> -- Return information about disk usage and shard sizes (default: false) +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-allocation-explain.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-cluster-getsettings-6-3]] +=== `cluster.getSettings` + +[source,js] +-------- +client.cluster.getSettings([params, [callback]]) +-------- + +Get cluster settings (previously set with `putSettings()`) + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-update-settings.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`includeDefaults`:: +<> -- Whether to return all default clusters setting. + +link:#[back to top] + +[[api-cluster-health-6-3]] +=== `cluster.health` + +[source,js] +-------- +client.cluster.health([params, [callback]]) +-------- + +Get a very simple status on the health of the cluster. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-health.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`[level=cluster]`:: +<> -- Specify the level of detail for returned information +Options::: + * `"cluster"` + * `"indices"` + * `"shards"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`waitForActiveShards`:: +<> -- Wait until the specified number of shards is active +`waitForNodes`:: +<> -- Wait until the specified number of nodes is available +`waitForEvents`:: +<> -- Wait until all currently queued events with the given priority are processed +Options::: + * `"immediate"` + * `"urgent"` + * `"high"` + * `"normal"` + * `"low"` + * `"languid"` + +`waitForNoRelocatingShards`:: +<> -- Whether to wait until there are no relocating shards in the cluster +`waitForNoInitializingShards`:: +<> -- Whether to wait until there are no initializing shards in the cluster +`waitForStatus`:: +<> -- Wait until cluster is in a specific state +Options::: + * `"green"` + * `"yellow"` + * `"red"` + +`index`:: +<>, <>, <> -- Limit the information returned to a specific index + +link:#[back to top] + +[[api-cluster-pendingtasks-6-3]] +=== `cluster.pendingTasks` + +[source,js] +-------- +client.cluster.pendingTasks([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-pending.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Specify timeout for connection to master + +link:#[back to top] + +[[api-cluster-putsettings-6-3]] +=== `cluster.putSettings` + +[source,js] +-------- +client.cluster.putSettings([params, [callback]]) +-------- + +Update cluster wide specific settings. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-update-settings.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-update-settings.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-cluster-remoteinfo-6-3]] +=== `cluster.remoteInfo` + +[source,js] +-------- +client.cluster.remoteInfo([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-remote-info.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-cluster-reroute-6-3]] +=== `cluster.reroute` + +[source,js] +-------- +client.cluster.reroute([params, [callback]]) +-------- + +Explicitly execute a cluster reroute allocation command including specific commands. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-reroute.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`dryRun`:: +<> -- Simulate the operation only and return the resulting state +`explain`:: +<> -- Return an explanation of why the commands can or cannot be executed +`retryFailed`:: +<> -- Retries allocation of shards that are blocked due to too many subsequent allocation failures +`metric`:: +<>, <>, <> -- Limit the information returned to the specified metrics. Defaults to all but metadata +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-reroute.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-cluster-state-6-3]] +=== `cluster.state` + +[source,js] +-------- +client.cluster.state([params, [callback]]) +-------- + +Get comprehensive details about the state of the whole cluster (indices settings, allocations, etc). + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-state.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Specify timeout for connection to master +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`metric`:: +<>, <>, <> -- Limit the information returned to the specified metrics + +link:#[back to top] + +[[api-cluster-stats-6-3]] +=== `cluster.stats` + +[source,js] +-------- +client.cluster.stats([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-stats.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`timeout`:: +<> -- Explicit operation timeout +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + +link:#[back to top] + +[[api-indices-analyze-6-3]] +=== `indices.analyze` + +[source,js] +-------- +client.indices.analyze([params, [callback]]) +-------- + +Perform the analysis process on a text and return the tokens breakdown of the text. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-analyze.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`index`:: +<> -- The name of the index to scope the operation +`preferLocal`:: +<> -- With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) +`[format=detailed]`:: +<> -- Format of the output +Options::: + * `"detailed"` + * `"text"` + +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-analyze.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-clearcache-6-3]] +=== `indices.clearCache` + +[source,js] +-------- +client.indices.clearCache([params, [callback]]) +-------- + +Clear either all caches or specific cached associated with one ore more indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-clearcache.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`fieldData`:: +<> -- Clear field data. This is deprecated. Prefer `fielddata`. +`fielddata`:: +<> -- Clear field data +`fields`:: +<>, <>, <> -- A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) +`query`:: +<> -- Clear query caches +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index name to limit the operation +`requestCache`:: +<> -- Clear request cache +`request`:: +<> -- Clear request cache +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-clearcache.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-close-6-3]] +=== `indices.close` + +[source,js] +-------- +client.indices.close([params, [callback]]) +-------- + +Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-open-close.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma separated list of indices to close +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-open-close.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-create-6-3]] +=== `indices.create` + +[source,js] +-------- +client.indices.create([params, [callback]]) +-------- + +Create an index in Elasticsearch. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-create-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`waitForActiveShards`:: +<> -- Set the number of active shards to wait for before the operation returns. +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`updateAllTypes`:: +<> -- Whether to update the mapping for all fields with the same name across all types or not +`index`:: +<> -- The name of the index +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-create-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-delete-6-3]] +=== `indices.delete` + +[source,js] +-------- +client.indices.delete([params, [callback]]) +-------- + +Delete an index in Elasticsearch + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-delete-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`ignoreUnavailable`:: +<> -- Ignore unavailable indexes (default: false) +`allowNoIndices`:: +<> -- Ignore if a wildcard expression resolves to no concrete indices (default: false) +`[expandWildcards=open]`:: +<> -- Whether wildcard expressions should get expanded to open or closed indices (default: open) +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-delete-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-deletealias-6-3]] +=== `indices.deleteAlias` + +[source,js] +-------- +client.indices.deleteAlias([params, [callback]]) +-------- + +Delete a specific alias. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit timestamp for the document +`masterTimeout`:: +<> -- Specify timeout for connection to master +`index`:: +<>, <>, <> -- A comma-separated list of index names (supports wildcards); use `_all` for all indices +`name`:: +<>, <>, <> -- A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-deletetemplate-6-3]] +=== `indices.deleteTemplate` + +[source,js] +-------- +client.indices.deleteTemplate([params, [callback]]) +-------- + +Delete an index template by its name. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`name`:: +<> -- The name of the template +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-exists-6-3]] +=== `indices.exists` + +[source,js] +-------- +client.indices.exists([params, [callback]]) +-------- + +Return a boolean indicating whether given index exists. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-exists.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +<> -- Ignore unavailable indexes (default: false) +`allowNoIndices`:: +<> -- Ignore if a wildcard expression resolves to no concrete indices (default: false) +`[expandWildcards=open]`:: +<> -- Whether wildcard expressions should get expanded to open or closed indices (default: open) +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`includeDefaults`:: +<> -- Whether to return all default setting for each of the indices. +`index`:: +<>, <>, <> -- A comma-separated list of index names +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-exists.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-existsalias-6-3]] +=== `indices.existsAlias` + +[source,js] +-------- +client.indices.existsAlias([params, [callback]]) +-------- + +Return a boolean indicating whether given alias exists. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=all]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names to filter aliases +`name`:: +<>, <>, <> -- A comma-separated list of alias names to return +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-existstemplate-6-3]] +=== `indices.existsTemplate` + +[source,js] +-------- +client.indices.existsTemplate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`name`:: +<>, <>, <> -- The comma separated names of the index templates +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-existstype-6-3]] +=== `indices.existsType` + +[source,js] +-------- +client.indices.existsType([params, [callback]]) +-------- + +Check if a type/types exists in an index/indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-types-exists.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` to check the types across all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to check +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-types-exists.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-flush-6-3]] +=== `indices.flush` + +[source,js] +-------- +client.indices.flush([params, [callback]]) +-------- + +Explicitly flush one or more indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-flush.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`force`:: +<> -- Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) +`waitIfOngoing`:: +<> -- If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string for all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-flush.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-flushsynced-6-3]] +=== `indices.flushSynced` + +[source,js] +-------- +client.indices.flushSynced([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-synced-flush.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string for all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-synced-flush.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-forcemerge-6-3]] +=== `indices.forcemerge` + +[source,js] +-------- +client.indices.forcemerge([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-forcemerge.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flush`:: +<> -- Specify whether the index should be flushed after performing the operation (default: true) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`maxNumSegments`:: +<> -- The number of segments the index should be merged into (default: dynamic) +`onlyExpungeDeletes`:: +<> -- Specify whether the operation should only expunge deleted documents +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-forcemerge.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-get-6-3]] +=== `indices.get` + +[source,js] +-------- +client.indices.get([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-get-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +<> -- Ignore unavailable indexes (default: false) +`allowNoIndices`:: +<> -- Ignore if a wildcard expression resolves to no concrete indices (default: false) +`[expandWildcards=open]`:: +<> -- Whether wildcard expressions should get expanded to open or closed indices (default: open) +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`includeDefaults`:: +<> -- Whether to return all default setting for each of the indices. +`index`:: +<>, <>, <> -- A comma-separated list of index names + +link:#[back to top] + +[[api-indices-getalias-6-3]] +=== `indices.getAlias` + +[source,js] +-------- +client.indices.getAlias([params, [callback]]) +-------- + +Retrieve a specified alias. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=all]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names to filter aliases +`name`:: +<>, <>, <> -- A comma-separated list of alias names to return + +link:#[back to top] + +[[api-indices-getfieldmapping-6-3]] +=== `indices.getFieldMapping` + +[source,js] +-------- +client.indices.getFieldMapping([params, [callback]]) +-------- + +Retrieve mapping definition of a specific field. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-get-field-mapping.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`includeDefaults`:: +<> -- Whether the default mapping values should be returned as well +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names +`type`:: +<>, <>, <> -- A comma-separated list of document types +`fields`:: +<>, <>, <> -- A comma-separated list of fields + +link:#[back to top] + +[[api-indices-getmapping-6-3]] +=== `indices.getMapping` + +[source,js] +-------- +client.indices.getMapping([params, [callback]]) +-------- + +Retrieve mapping definition of index or index/type. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-get-mapping.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names +`type`:: +<>, <>, <> -- A comma-separated list of document types + +link:#[back to top] + +[[api-indices-getsettings-6-3]] +=== `indices.getSettings` + +[source,js] +-------- +client.indices.getSettings([params, [callback]]) +-------- + +Retrieve settings for one or more (or all) indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-get-settings.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open,closed]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`includeDefaults`:: +<> -- Whether to return all default setting for each of the indices. +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`name`:: +<>, <>, <> -- The name of the settings that should be included + +link:#[back to top] + +[[api-indices-gettemplate-6-3]] +=== `indices.getTemplate` + +[source,js] +-------- +client.indices.getTemplate([params, [callback]]) +-------- + +Retrieve an index template by its name. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`name`:: +<>, <>, <> -- The comma separated names of the index templates + +link:#[back to top] + +[[api-indices-getupgrade-6-3]] +=== `indices.getUpgrade` + +[source,js] +-------- +client.indices.getUpgrade([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-upgrade.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + +[[api-indices-open-6-3]] +=== `indices.open` + +[source,js] +-------- +client.indices.open([params, [callback]]) +-------- + +Open a closed index, making it available for search. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-open-close.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=closed]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`waitForActiveShards`:: +<> -- Sets the number of active shards to wait for before the operation returns. +`index`:: +<>, <>, <> -- A comma separated list of indices to open +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-open-close.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-putalias-6-3]] +=== `indices.putAlias` + +[source,js] +-------- +client.indices.putAlias([params, [callback]]) +-------- + +Create an alias for a specific index/indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit timestamp for the document +`masterTimeout`:: +<> -- Specify timeout for connection to master +`index`:: +<>, <>, <> -- A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. +`name`:: +<> -- The name of the alias to be created or updated +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-putmapping-6-3]] +=== `indices.putMapping` + +[source,js] +-------- +client.indices.putMapping([params, [callback]]) +-------- + +Register specific mapping definition for a specific type. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-put-mapping.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`updateAllTypes`:: +<> -- Whether to update the mapping for all fields with the same name across all types or not +`index`:: +<>, <>, <> -- A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. +`type`:: +<> -- The name of the document type +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-put-mapping.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-putsettings-6-3]] +=== `indices.putSettings` + +[source,js] +-------- +client.indices.putSettings([params, [callback]]) +-------- + +Change specific index level settings in real time. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-update-settings.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Specify timeout for connection to master +`timeout`:: +<> -- Explicit operation timeout +`preserveExisting`:: +<> -- Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-update-settings.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-puttemplate-6-3]] +=== `indices.putTemplate` + +[source,js] +-------- +client.indices.putTemplate([params, [callback]]) +-------- + +Create an index template that will automatically be applied to new indices created. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`order`:: +<> -- The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) +`create`:: +<> -- Whether the index template should only be added if new or can also replace an existing one +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`name`:: +<> -- The name of the template +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-templates.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-recovery-6-3]] +=== `indices.recovery` + +[source,js] +-------- +client.indices.recovery([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-recovery.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`detailed`:: +<> -- Whether to display detailed information about shard recovery +`activeOnly`:: +<> -- Display only those recoveries that are currently on-going +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + +[[api-indices-refresh-6-3]] +=== `indices.refresh` + +[source,js] +-------- +client.indices.refresh([params, [callback]]) +-------- + +Explicitly refresh one or more index, making all operations performed since the last refresh available for search. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-refresh.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-refresh.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-rollover-6-3]] +=== `indices.rollover` + +[source,js] +-------- +client.indices.rollover([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-rollover-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`dryRun`:: +<> -- If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false +`masterTimeout`:: +<> -- Specify timeout for connection to master +`waitForActiveShards`:: +<> -- Set the number of active shards to wait for on the newly created rollover index before the operation returns. +`alias`:: +<> -- The name of the alias to rollover +`newIndex`:: +<> -- The name of the rollover index +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-rollover-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-segments-6-3]] +=== `indices.segments` + +[source,js] +-------- +client.indices.segments([params, [callback]]) +-------- + +Retrieve low level segments information that a Lucene index (shard level) is built with. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-segments.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`verbose`:: +<> -- Includes detailed memory usage by Lucene. +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + +[[api-indices-shardstores-6-3]] +=== `indices.shardStores` + +[source,js] +-------- +client.indices.shardStores([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-shards-stores.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`status`:: +<>, <>, <> -- A comma-separated list of statuses used to filter on shards to get store information for +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + +[[api-indices-shrink-6-3]] +=== `indices.shrink` + +[source,js] +-------- +client.indices.shrink([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-shrink-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`waitForActiveShards`:: +<> -- Set the number of active shards to wait for on the shrunken index before the operation returns. +`index`:: +<> -- The name of the source index to shrink +`target`:: +<> -- The name of the target index to shrink into +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-shrink-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-split-6-3]] +=== `indices.split` + +[source,js] +-------- +client.indices.split([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-split-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`waitForActiveShards`:: +<> -- Set the number of active shards to wait for on the shrunken index before the operation returns. +`index`:: +<> -- The name of the source index to split +`target`:: +<> -- The name of the target index to split into +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-split-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-stats-6-3]] +=== `indices.stats` + +[source,js] +-------- +client.indices.stats([params, [callback]]) +-------- + +Retrieve statistics on different operations happening on an index. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-stats.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`completionFields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) +`fielddataFields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` index metric (supports wildcards) +`fields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) +`groups`:: +<>, <>, <> -- A comma-separated list of search groups for `search` index metric +`[level=indices]`:: +<> -- Return stats aggregated at cluster, index or shard level +Options::: + * `"cluster"` + * `"indices"` + * `"shards"` + +`types`:: +<>, <>, <> -- A comma-separated list of document types for the `indexing` index metric +`includeSegmentFileSizes`:: +<> -- Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`metric`:: +<>, <>, <> -- Limit the information returned the specific metrics. + +link:#[back to top] + +[[api-indices-updatealiases-6-3]] +=== `indices.updateAliases` + +[source,js] +-------- +client.indices.updateAliases([params, [callback]]) +-------- + +Update specified aliases. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +.Perform an atomic alias swap, for a rotating index +[source,js] +--------- +const response = await client.indices.updateAliases({ + body: { + actions: [ + { remove: { index: 'logstash-2014.04', alias: 'logstash-current' } }, + { add: { index: 'logstash-2014.05', alias: 'logstash-current' } } + ] + } +}); +--------- + + + +*Params* + +[horizontal] +`timeout`:: +<> -- Request timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-upgrade-6-3]] +=== `indices.upgrade` + +[source,js] +-------- +client.indices.upgrade([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-upgrade.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`waitForCompletion`:: +<> -- Specify whether the request should block until the all segments are upgraded (default: false) +`onlyAncientSegments`:: +<> -- If true, only ancient (an older Lucene major release) segments will be upgraded +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-upgrade.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-validatequery-6-3]] +=== `indices.validateQuery` + +[source,js] +-------- +client.indices.validateQuery([params, [callback]]) +-------- + +Validate a potentially expensive query without executing it. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-validate.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`explain`:: +<> -- Return detailed information about the error +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`q`:: +<> -- Query in the Lucene query string syntax +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`rewrite`:: +<> -- Provide a more detailed explanation showing the actual Lucene query that will be executed. +`allShards`:: +<> -- Execute validation on all shards instead of one random shard per index +`index`:: +<>, <>, <> -- A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-validate.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-ingest-deletepipeline-6-3]] +=== `ingest.deletePipeline` + +[source,js] +-------- +client.ingest.deletePipeline([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`id`:: +<> -- Pipeline ID +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-ingest-getpipeline-6-3]] +=== `ingest.getPipeline` + +[source,js] +-------- +client.ingest.getPipeline([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`id`:: +<> -- Comma separated list of pipeline ids. Wildcards supported + +link:#[back to top] + +[[api-ingest-processorgrok-6-3]] +=== `ingest.processorGrok` + +[source,js] +-------- +client.ingest.processorGrok([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-ingest-putpipeline-6-3]] +=== `ingest.putPipeline` + +[source,js] +-------- +client.ingest.putPipeline([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`id`:: +<> -- Pipeline ID +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-ingest-simulate-6-3]] +=== `ingest.simulate` + +[source,js] +-------- +client.ingest.simulate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`verbose`:: +<> -- Verbose mode. Display data output for each processor in executed pipeline +`id`:: +<> -- Pipeline ID +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/ingest.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-nodes-hotthreads-6-3]] +=== `nodes.hotThreads` + +[source,js] +-------- +client.nodes.hotThreads([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-nodes-hot-threads.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`interval`:: +<> -- The interval for the second sampling of threads +`snapshots`:: +<> -- Number of samples of thread stacktrace (default: 10) +`threads`:: +<> -- Specify the number of threads to provide information for (default: 3) +`ignoreIdleThreads`:: +<> -- Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) +`type`:: +<> -- The type to sample (default: cpu) +Options::: + * `"cpu"` + * `"wait"` + * `"block"` + +`timeout`:: +<> -- Explicit operation timeout +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + +link:#[back to top] + +[[api-nodes-info-6-3]] +=== `nodes.info` + +[source,js] +-------- +client.nodes.info([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-nodes-info.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`timeout`:: +<> -- Explicit operation timeout +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +`metric`:: +<>, <>, <> -- A comma-separated list of metrics you wish returned. Leave empty to return all. + +link:#[back to top] + +[[api-nodes-stats-6-3]] +=== `nodes.stats` + +[source,js] +-------- +client.nodes.stats([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-nodes-stats.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`completionFields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) +`fielddataFields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` index metric (supports wildcards) +`fields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) +`groups`:: +<> -- A comma-separated list of search groups for `search` index metric +`[level=node]`:: +<> -- Return indices stats aggregated at index, node or shard level +Options::: + * `"indices"` + * `"node"` + * `"shards"` + +`types`:: +<>, <>, <> -- A comma-separated list of document types for the `indexing` index metric +`timeout`:: +<> -- Explicit operation timeout +`includeSegmentFileSizes`:: +<> -- Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) +`metric`:: +<>, <>, <> -- Limit the information returned to the specified metrics +`indexMetric`:: +<>, <>, <> -- Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + +link:#[back to top] + +[[api-nodes-usage-6-3]] +=== `nodes.usage` + +[source,js] +-------- +client.nodes.usage([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/cluster-nodes-usage.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`metric`:: +<>, <>, <> -- Limit the information returned to the specified metrics +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + +link:#[back to top] + +[[api-snapshot-create-6-3]] +=== `snapshot.create` + +[source,js] +-------- +client.snapshot.create([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`waitForCompletion`:: +<> -- Should this request wait until the operation has completed before returning +`repository`:: +<> -- A repository name +`snapshot`:: +<> -- A snapshot name +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-createrepository-6-3]] +=== `snapshot.createRepository` + +[source,js] +-------- +client.snapshot.createRepository([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`verify`:: +<> -- Whether to verify the repository after creation +`repository`:: +<> -- A repository name +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-delete-6-3]] +=== `snapshot.delete` + +[source,js] +-------- +client.snapshot.delete([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`repository`:: +<> -- A repository name +`snapshot`:: +<> -- A snapshot name +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-deleterepository-6-3]] +=== `snapshot.deleteRepository` + +[source,js] +-------- +client.snapshot.deleteRepository([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`repository`:: +<>, <>, <> -- A comma-separated list of repository names +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-get-6-3]] +=== `snapshot.get` + +[source,js] +-------- +client.snapshot.get([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`ignoreUnavailable`:: +<> -- Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown +`verbose`:: +<> -- Whether to show verbose snapshot info or only show the basic info found in the repository index blob +`repository`:: +<> -- A repository name +`snapshot`:: +<>, <>, <> -- A comma-separated list of snapshot names + +link:#[back to top] + +[[api-snapshot-getrepository-6-3]] +=== `snapshot.getRepository` + +[source,js] +-------- +client.snapshot.getRepository([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`repository`:: +<>, <>, <> -- A comma-separated list of repository names + +link:#[back to top] + +[[api-snapshot-restore-6-3]] +=== `snapshot.restore` + +[source,js] +-------- +client.snapshot.restore([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`waitForCompletion`:: +<> -- Should this request wait until the operation has completed before returning +`repository`:: +<> -- A repository name +`snapshot`:: +<> -- A snapshot name +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-status-6-3]] +=== `snapshot.status` + +[source,js] +-------- +client.snapshot.status([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`ignoreUnavailable`:: +<> -- Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown +`repository`:: +<> -- A repository name +`snapshot`:: +<>, <>, <> -- A comma-separated list of snapshot names + +link:#[back to top] + +[[api-snapshot-verifyrepository-6-3]] +=== `snapshot.verifyRepository` + +[source,js] +-------- +client.snapshot.verifyRepository([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`repository`:: +<> -- A repository name +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-tasks-cancel-6-3]] +=== `tasks.cancel` + +[source,js] +-------- +client.tasks.cancel([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`nodes`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +`actions`:: +<>, <>, <> -- A comma-separated list of actions that should be cancelled. Leave empty to cancel all. +`parentTaskId`:: +<> -- Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. +`taskId`:: +<> -- Cancel the task with specified task id (node_id:task_number) +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-tasks-get-6-3]] +=== `tasks.get` + +[source,js] +-------- +client.tasks.get([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`waitForCompletion`:: +<> -- Wait for the matching tasks to complete (default: false) +`timeout`:: +<> -- Explicit operation timeout +`taskId`:: +<> -- Return the task with specified id (node_id:task_number) + +link:#[back to top] + +[[api-tasks-list-6-3]] +=== `tasks.list` + +[source,js] +-------- +client.tasks.list([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`nodes`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +`actions`:: +<>, <>, <> -- A comma-separated list of actions that should be returned. Leave empty to return all. +`detailed`:: +<> -- Return detailed task information (default: false) +`parentTaskId`:: +<> -- Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. +`waitForCompletion`:: +<> -- Wait for the matching tasks to complete (default: false) +`[groupBy=nodes]`:: +<> -- Group tasks by nodes or parent/child relationships +Options::: + * `"nodes"` + * `"parents"` + * `"none"` + +`timeout`:: +<> -- Explicit operation timeout + +link:#[back to top] diff --git a/docs/api_methods_6_5.asciidoc b/docs/api_methods_6_5.asciidoc new file mode 100644 index 000000000..86cf62742 --- /dev/null +++ b/docs/api_methods_6_5.asciidoc @@ -0,0 +1,5270 @@ +[[api-reference-6-5]] +== 6.5 API + + +NOTE: At this time, you must opt into the 6.5 API by setting the `apiVersion` config parameter. + + +[[api-bulk-6-5]] +=== `bulk` + +[source,js] +-------- +client.bulk([params, [callback]]) +-------- + +Perform many index/delete operations in a single API call. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-bulk.html[the elasticsearch docs] for more information pertaining to this method. + +.Perform three operations in a single request +[source,js] +--------- +client.bulk({ + body: [ + // action description + { index: { _index: 'myindex', _type: 'mytype', _id: 1 } }, + // the document to index + { title: 'foo' }, + // action description + { update: { _index: 'myindex', _type: 'mytype', _id: 2 } }, + // the document to update + { doc: { title: 'foo' } }, + // action description + { delete: { _index: 'myindex', _type: 'mytype', _id: 3 } }, + // no document needed for this delete + ] +}, function (err, resp) { + // ... +}); +--------- + + +*Params* + +[horizontal] +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the bulk 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) +`refresh`:: +<> -- If `true` then refresh the effected 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`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`type`:: +<> -- Default document type for items which don't provide one +`fields`:: +<>, <>, <> -- Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request +`_sourceExclude`:: +<>, <>, <> -- Default list of fields to exclude from the returned _source field, can be overridden on each sub-request +`_sourceInclude`:: +<>, <>, <> -- Default list of fields to extract and return from the _source field, can be overridden on each sub-request +`pipeline`:: +<> -- The pipeline id to preprocess incoming documents with +`index`:: +<> -- Default index for items which don't provide one +`body`:: +<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-bulk.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-clearscroll-6-5]] +=== `clearScroll` + +[source,js] +-------- +client.clearScroll([params, [callback]]) +-------- + +Clear the scroll request created by specifying the scroll parameter to search. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-request-scroll.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`scrollId`:: +<>, <>, <> -- A comma-separated list of scroll IDs to clear +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-request-scroll.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-count-6-5]] +=== `count` + +[source,js] +-------- +client.count([params, [callback]]) +-------- + +Get the number of documents for the cluster, index, type, or a query. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-count.html[the elasticsearch docs] for more information pertaining to this method. + +.Get the number of all documents in the cluster +[source,js] +--------- +const { count } = await client.count(); +--------- + +.Get the number of documents in an index +[source,js] +--------- +const { count } = await client.count({ + index: 'index_name' +}); +--------- + +.Get the number of documents matching a query +[source,js] +--------- +const { count } = await client.count({ + index: 'index_name', + body: { + query: { + filtered: { + filter: { + terms: { + foo: ['bar'] + } + } + } + } + } +}); +--------- + + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`minScore`:: +<> -- Include only documents with a specific `_score` value in the result +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`q`:: +<> -- Query in the Lucene query string syntax +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`terminateAfter`:: +<> -- The maximum count for each shard, upon reaching which the query execution will terminate early +`index`:: +<>, <>, <> -- A comma-separated list of indices to restrict the results +`type`:: +<>, <>, <> -- A comma-separated list of types to restrict the results +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-count.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-create-6-5]] +=== `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. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-index_.html[the elasticsearch docs] for more information pertaining to this method. + +.Create a document +[source,js] +--------- +await client.create({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + title: 'Test 1', + tags: ['y', 'z'], + published: true, + published_at: '2013-01-01', + counter: 1 + } +}); +--------- + + + +*Params* + +[horizontal] +`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) +`parent`:: +<> -- ID of the parent document +`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. +Options::: + * `"true"` + * `"false"` + * `"wait_for"` + * `""` + +`routing`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`pipeline`:: +<> -- The pipeline id to preprocess incoming documents with +`id`:: +<> -- Document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-index_.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-delete-6-5]] +=== `delete` + +[source,js] +-------- +client.delete([params, [callback]]) +-------- + +Delete a typed JSON document from a specific index based on its id. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete.html[the elasticsearch docs] for more information pertaining to this method. + +.Delete the document `/myindex/mytype/1` +[source,js] +--------- +await client.delete({ + index: 'myindex', + type: 'mytype', + id: '1' +}); +--------- + + + +*Params* + +[horizontal] +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the delete 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`:: +<> -- ID of parent document +`refresh`:: +<> -- If `true` then refresh the effected 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`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-deletebyquery-6-5]] +=== `deleteByQuery` + +[source,js] +-------- +client.deleteByQuery([params, [callback]]) +-------- + +Delete documents from one or more indices and one or more types based on a query. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete-by-query.html[the elasticsearch docs] for more information pertaining to this method. + +.Deleting documents with a simple query +[source,js] +--------- +await client.deleteByQuery({ + index: 'myindex', + q: 'test' +}); +--------- + +.Deleting documents using the Query DSL +[source,js] +--------- +await client.deleteByQuery({ + index: 'posts', + body: { + query: { + term: { published: false } + } + } +}); +--------- + + + +*Params* + +[horizontal] +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`from`:: +<> -- Starting offset (default: 0) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[conflicts=abort]`:: +<> -- What to do when the delete by query hits version conflicts? +Options::: + * `"abort"` + * `"proceed"` + +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`q`:: +<> -- Query in the Lucene query string syntax +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"dfs_query_then_fetch"` + +`searchTimeout`:: +<> -- Explicit timeout for each search request. Defaults to no timeout. +`size`:: +<> -- Number of hits to return (default: 10) +`sort`:: +<>, <>, <> -- A comma-separated list of : pairs +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`terminateAfter`:: +<> -- The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +`stats`:: +<>, <>, <> -- Specific 'tag' of the request for logging and statistical purposes +`version`:: +<> -- Specify whether to return document version as part of a hit +`requestCache`:: +<> -- Specify if request cache should be used for this request or not, defaults to index level setting +`refresh`:: +<> -- Should the effected indexes be refreshed? +`[timeout=1m]`:: +<> -- Time each individual bulk request should wait for shards that are unavailable. +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the delete by query 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) +`scrollSize`:: +<> -- Size on the scroll request powering the delete by query +`[waitForCompletion=true]`:: +<> -- Should the request should block until the delete by query is complete. +`requestsPerSecond`:: +<> -- The throttle for this request in sub-requests per second. -1 means no throttle. +`[slices=1]`:: +<> -- The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete-by-query.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-deletebyqueryrethrottle-6-5]] +=== `deleteByQueryRethrottle` + +[source,js] +-------- +client.deleteByQueryRethrottle([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete-by-query.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`requestsPerSecond`:: +<> -- The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. +`taskId`:: +<> -- The task id to rethrottle +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete-by-query.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-deletescript-6-5]] +=== `deleteScript` + +[source,js] +-------- +client.deleteScript([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`id`:: +<> -- Script ID +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-scripting.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-exists-6-5]] +=== `exists` + +[source,js] +-------- +client.exists([params, [callback]]) +-------- + +Returns a boolean indicating whether or not a given document exists. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html[the elasticsearch docs] for more information pertaining to this method. + +.Check that the document `/myindex/mytype/1` exist +[source,js] +--------- +const exists = await client.exists({ + index: 'myindex', + type: 'mytype', + id: 1 +}); +--------- + + + +*Params* + +[horizontal] +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return in the response +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document (use `_all` to fetch the first document matching the ID across all types) +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-existssource-6-5]] +=== `existsSource` + +[source,js] +-------- +client.existsSource([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document; use `_all` to fetch the first document matching the ID across all types +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-explain-6-5]] +=== `explain` + +[source,js] +-------- +client.explain([params, [callback]]) +-------- + +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-explain.html[the elasticsearch docs] for more information pertaining to this method. + +.See how a document is scored against a simple query +[source,js] +--------- +const response = await client.explain({ + // the document to test + index: 'myindex', + type: 'mytype', + id: '1', + + // the query to score it against + q: 'field:value' +}); +--------- + +.See how a document is scored against a query written in the Query DSL +[source,js] +--------- +const response = await client.explain({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + query: { + match: { title: 'test' } + } + } +}); +--------- + + + +*Params* + +[horizontal] +`analyzeWildcard`:: +<> -- Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) +`analyzer`:: +<> -- The analyzer for the query string query +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The default field for query string query (default: _all) +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return in the response +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`q`:: +<> -- Query in the Lucene query string syntax +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-explain.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-fieldcaps-6-5]] +=== `fieldCaps` + +[source,js] +-------- +client.fieldCaps([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-field-caps.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`fields`:: +<>, <>, <> -- A comma-separated list of field names +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-field-caps.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-get-6-5]] +=== `get` + +[source,js] +-------- +client.get([params, [callback]]) +-------- + +Get a typed JSON document from the index based on its id. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html[the elasticsearch docs] for more information pertaining to this method. + +.Get `/myindex/mytype/1` +[source,js] +--------- +const response = await client.get({ + index: 'myindex', + type: 'mytype', + id: 1 +}); +--------- + + + +*Params* + +[horizontal] +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return in the response +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document (use `_all` to fetch the first document matching the ID across all types) + +link:#[back to top] + +[[api-getscript-6-5]] +=== `getScript` + +[source,js] +-------- +client.getScript([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Specify timeout for connection to master +`id`:: +<> -- Script ID + +link:#[back to top] + +[[api-getsource-6-5]] +=== `getSource` + +[source,js] +-------- +client.getSource([params, [callback]]) +-------- + +Get the source of a document by its index, type and id. + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`parent`:: +<> -- The ID of the parent document +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`id`:: +<> -- The document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document; use `_all` to fetch the first document matching the ID across all types + +link:#[back to top] + +[[api-index-6-5]] +=== `index` + +[source,js] +-------- +client.index([params, [callback]]) +-------- + +Stores a typed JSON document in an index, making it searchable. When the `id` param is not set, a unique id will be auto-generated. When you specify an `id` either a new document will be created, or an existing document will be updated. To enforce "put-if-absent" behavior set the `opType` to `"create"` or use the `create()` method. + +Optimistic concurrency control is performed, when the `version` argument is specified. By default, no version checks are performed. + +By default, the document will be available for `get()` actions immediately, but will only be available for searching after an index refresh (which can happen automatically or manually). See <>. + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-index_.html[the elasticsearch docs] for more information pertaining to this method. + +.Create or update a document +[source,js] +--------- +const response = await client.index({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + title: 'Test 1', + tags: ['y', 'z'], + published: true, + } +}); +--------- + + + +*Params* + +[horizontal] +`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) +`[opType=index]`:: +<> -- Explicit operation type +Options::: + * `"index"` + * `"create"` + +`parent`:: +<> -- ID of the parent document +`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. +Options::: + * `"true"` + * `"false"` + * `"wait_for"` + * `""` + +`routing`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`pipeline`:: +<> -- The pipeline id to preprocess incoming documents with +`id`:: +<> -- Document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-index_.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-info-6-5]] +=== `info` + +[source,js] +-------- +client.info([params, [callback]]) +-------- + +Get basic info from the current cluster. + +Check the *<>* and http://www.elastic.co/guide/[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-mget-6-5]] +=== `mget` + +[source,js] +-------- +client.mget([params, [callback]]) +-------- + +Get multiple documents based on an index, type (optional) and ids. The body required by mget can take two forms: an array of document locations, or an array of document ids. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-multi-get.html[the elasticsearch docs] for more information pertaining to this method. + +.An array of doc locations. Useful for getting documents from different indices. +[source,js] +--------- +const response = await client.mget({ + body: { + docs: [ + { _index: 'indexA', _type: 'typeA', _id: '1' }, + { _index: 'indexB', _type: 'typeB', _id: '1' }, + { _index: 'indexC', _type: 'typeC', _id: '1' } + ] + } +}); +--------- + +.An array of ids. You must also specify the `index` and `type` that apply to all of the ids. +[source,js] +--------- +const response = await client.mget({ + index: 'myindex', + type: 'mytype', + body: { + ids: [1, 2, 3] + } +}); +--------- + + + +*Params* + +[horizontal] +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return in the response +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`realtime`:: +<> -- Specify whether to perform the operation in realtime or search mode +`refresh`:: +<> -- Refresh the shard containing the document before performing the operation +`routing`:: +<> -- Specific routing value +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-multi-get.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-msearch-6-5]] +=== `msearch` + +[source,js] +-------- +client.msearch([params, [callback]]) +-------- + +Execute several search requests within the same request. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-multi-search.html[the elasticsearch docs] for more information pertaining to this method. + +.Perform multiple different searches, the body is made up of meta/data pairs +[source,js] +--------- +const response = await client.msearch({ + body: [ + // match all query, on all indices and types + {}, + { query: { match_all: {} } }, + + // query_string query, on index/mytype + { index: 'myindex', type: 'mytype' }, + { query: { query_string: { query: '"Test 1"' } } } + ] +}); +--------- + + + +*Params* + +[horizontal] +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"query_and_fetch"` + * `"dfs_query_then_fetch"` + * `"dfs_query_and_fetch"` + +`maxConcurrentSearches`:: +<> -- Controls the maximum number of concurrent searches the multi search api will execute +`typedKeys`:: +<> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response +`[preFilterShardSize=128]`:: +<> -- A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. +`[maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.]`:: +<> -- The number of concurrent shard requests each sub search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests +`index`:: +<>, <>, <> -- A comma-separated list of index names to use as default +`type`:: +<>, <>, <> -- A comma-separated list of document types to use as default +`body`:: +<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-multi-search.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-msearchtemplate-6-5]] +=== `msearchTemplate` + +[source,js] +-------- +client.msearchTemplate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-multi-search.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"query_and_fetch"` + * `"dfs_query_then_fetch"` + * `"dfs_query_and_fetch"` + +`typedKeys`:: +<> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response +`maxConcurrentSearches`:: +<> -- Controls the maximum number of concurrent searches the multi search api will execute +`index`:: +<>, <>, <> -- A comma-separated list of index names to use as default +`type`:: +<>, <>, <> -- A comma-separated list of document types to use as default +`body`:: +<>, <> -- The request body, as either an array of objects or new-line delimited JSON objects. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-multi-search.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-mtermvectors-6-5]] +=== `mtermvectors` + +[source,js] +-------- +client.mtermvectors([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-multi-termvectors.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ids`:: +<>, <>, <> -- A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body +`termStatistics`:: +<> -- Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`[fieldStatistics=true]`:: +<> -- Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`fields`:: +<>, <>, <> -- A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`[offsets=true]`:: +<> -- Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`[positions=true]`:: +<> -- Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`[payloads=true]`:: +<> -- Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". +`routing`:: +<> -- Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`parent`:: +<> -- Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". +`realtime`:: +<> -- Specifies if requests are real-time as opposed to near-real-time (default: true). +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`index`:: +<> -- The index in which the document resides. +`type`:: +<> -- The type of the document. +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-multi-termvectors.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-ping-6-5]] +=== `ping` + +[source,js] +-------- +client.ping([params, [callback]]) +-------- + +// no description + +Check the *<>* and http://www.elastic.co/guide/[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-putscript-6-5]] +=== `putScript` + +[source,js] +-------- +client.putScript([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-scripting.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`context`:: +<> -- Script context +`id`:: +<> -- Script ID +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-scripting.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-rankeval-6-5]] +=== `rankEval` + +[source,js] +-------- +client.rankEval([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-rank-eval.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-rank-eval.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-reindex-6-5]] +=== `reindex` + +[source,js] +-------- +client.reindex([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-reindex.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`refresh`:: +<> -- Should the effected indexes be refreshed? +`[timeout=1m]`:: +<> -- Time each individual bulk request should wait for shards that are unavailable. +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the reindex 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) +`[waitForCompletion=true]`:: +<> -- Should the request should block until the reindex is complete. +`requestsPerSecond`:: +<> -- The throttle to set on this request in sub-requests per second. -1 means no throttle. +`[slices=1]`:: +<> -- The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-reindex.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-reindexrethrottle-6-5]] +=== `reindexRethrottle` + +[source,js] +-------- +client.reindexRethrottle([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-reindex.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`requestsPerSecond`:: +<> -- The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. +`taskId`:: +<> -- The task id to rethrottle +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-reindex.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-rendersearchtemplate-6-5]] +=== `renderSearchTemplate` + +[source,js] +-------- +client.renderSearchTemplate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-template.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`id`:: +<> -- The id of the stored search template +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-template.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-scriptspainlessexecute-6-5]] +=== `scriptsPainlessExecute` + +[source,js] +-------- +client.scriptsPainlessExecute([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/painless/6.5/painless-execute-api.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-scroll-6-5]] +=== `scroll` + +[source,js] +-------- +client.scroll([params, [callback]]) +-------- + +Scroll a search request (retrieve the next set of results) after specifying the scroll parameter in a `search()` call. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-request-scroll.html[the elasticsearch docs] for more information pertaining to this method. + +.Collect every title in the index that contains the word "test" +[source,js] +--------- +const allTitles = []; +const responseQueue = []; + +// start things off by searching, setting a scroll timeout, and pushing +// our first response into the queue to be processed +await client.search({ + index: 'myindex', + scroll: '30s', // keep the search results "scrollable" for 30 seconds + source: ['title'], // filter the source to only include the title field + q: 'title:test' +}) + +while (responseQueue.length) { + const response = responseQueue.shift(); + + // collect the titles from this response + response.hits.hits.forEach(function (hit) { + allTitles.push(hit.fields.title); + }); + + // check to see if we have collected all of the titles + if (response.hits.total === allTitles.length) { + console.log('every "test" title', allTitles); + break + } + + // get the next response if there are more titles to fetch + responseQueue.push( + await client.scroll({ + scrollId: response._scroll_id, + scroll: '30s' + }) + ); +} +--------- + + + +*Params* + +[horizontal] +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`scrollId`:: +<> -- The scroll ID +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-request-scroll.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-search-6-5]] +=== `search` + +[source,js] +-------- +client.search([params, [callback]]) +-------- + +Return documents matching a query, aggregations/facets, highlighted snippets, suggestions, and more. Write your queries as either http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-uri-request.html[simple query strings] in the `q` parameter, or by specifying a http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-body.html[full request definition] using the http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html[Elasticsearch Query DSL] in the `body` parameter. + +TIP: https://github.com/danpaz/bodybuilder[bodybuilder] and https://github.com/sudo-suhas/elastic-builder[elastic-builder] can be used to make building query bodies easier. + + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-search.html[the elasticsearch docs] for more information pertaining to this method. + +.Search with a simple query string query +[source,js] +--------- +const response = await client.search({ + index: 'myindex', + q: 'title:test' +}); +--------- + +.Passing a full request definition in the Elasticsearch's Query DSL as a `Hash` +[source,js] +--------- +const response = await client.search({ + index: 'myindex', + body: { + query: { + match: { + title: 'test' + } + }, + facets: { + tags: { + terms: { + field: 'tags' + } + } + } + } +}); +--------- + + + +*Params* + +[horizontal] +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`explain`:: +<> -- Specify whether to return detailed information about score computation as part of a hit +`storedFields`:: +<>, <>, <> -- A comma-separated list of stored fields to return as part of a hit +`docvalueFields`:: +<>, <>, <> -- A comma-separated list of fields to return as the docvalue representation of a field for each hit +`from`:: +<> -- Starting offset (default: 0) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`q`:: +<> -- Query in the Lucene query string syntax +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"dfs_query_then_fetch"` + +`size`:: +<> -- Number of hits to return (default: 10) +`sort`:: +<>, <>, <> -- A comma-separated list of : pairs +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`terminateAfter`:: +<> -- The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +`stats`:: +<>, <>, <> -- Specific 'tag' of the request for logging and statistical purposes +`suggestField`:: +<> -- Specify which field to use for suggestions +`[suggestMode=missing]`:: +<> -- Specify suggest mode +Options::: + * `"missing"` + * `"popular"` + * `"always"` + +`suggestSize`:: +<> -- How many suggestions to return in response +`suggestText`:: +<> -- The source text for which the suggestions should be returned +`timeout`:: +<> -- Explicit operation timeout +`trackScores`:: +<> -- Whether to calculate and return scores even if they are not used for sorting +`trackTotalHits`:: +<> -- Indicate if the number of documents that match the query should be tracked +`[allowPartialSearchResults=true]`:: +<> -- Indicate if an error should be returned if there is a partial search failure or timeout +`typedKeys`:: +<> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response +`version`:: +<> -- Specify whether to return document version as part of a hit +`requestCache`:: +<> -- Specify if request cache should be used for this request or not, defaults to index level setting +`[batchedReduceSize=512]`:: +<> -- The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. +`[maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.]`:: +<> -- The number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests +`[preFilterShardSize=128]`:: +<> -- A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-search.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-searchshards-6-5]] +=== `searchShards` + +[source,js] +-------- +client.searchShards([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-shards.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +<> -- Specific routing value +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-shards.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-searchtemplate-6-5]] +=== `searchTemplate` + +[source,js] +-------- +client.searchTemplate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-template.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"query_and_fetch"` + * `"dfs_query_then_fetch"` + * `"dfs_query_and_fetch"` + +`explain`:: +<> -- Specify whether to return detailed information about score computation as part of a hit +`profile`:: +<> -- Specify whether to profile the query execution +`typedKeys`:: +<> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-template.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-termvectors-6-5]] +=== `termvectors` + +[source,js] +-------- +client.termvectors([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-termvectors.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`termStatistics`:: +<> -- Specifies if total term frequency and document frequency should be returned. +`[fieldStatistics=true]`:: +<> -- Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. +`fields`:: +<>, <>, <> -- A comma-separated list of fields to return. +`[offsets=true]`:: +<> -- Specifies if term offsets should be returned. +`[positions=true]`:: +<> -- Specifies if term positions should be returned. +`[payloads=true]`:: +<> -- Specifies if term payloads should be returned. +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random). +`routing`:: +<> -- Specific routing value. +`parent`:: +<> -- Parent id of documents. +`realtime`:: +<> -- Specifies if request is real-time as opposed to near-real-time (default: true). +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"external"` + * `"external_gte"` + * `"force"` + +`index`:: +<> -- The index in which the document resides. +`type`:: +<> -- The type of the document. +`id`:: +<> -- The id of the document, when not specified a doc param should be supplied. +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-termvectors.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-update-6-5]] +=== `update` + +[source,js] +-------- +client.update([params, [callback]]) +-------- + +Update parts of a document. The required body parameter can contain one of two things: + + * a partial document, which will be merged with the existing one. + * a `script` which will update the document content + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-update.html[the elasticsearch docs] for more information pertaining to this method. + +.Update document title using partial document +[source,js] +--------- +const response = await client.update({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + // put the partial document under the `doc` key + doc: { + title: 'Updated' + } + } +}) +--------- + +.Add a tag to document `tags` property using a `script` +[source,js] +--------- +const response = await client.update({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + script: 'ctx._source.tags += tag', + params: { tag: 'some new tag' } + } +}); +--------- + +.Increment a document counter by 1 or initialize it, when the document does not exist +[source,js] +--------- +const response = await client.update({ + index: 'myindex', + type: 'mytype', + id: '777', + body: { + script: 'ctx._source.counter += 1', + upsert: { + counter: 1 + } + } +}) +--------- + +.Delete a document if it's tagged “to-delete” +[source,js] +--------- +const response = await client.update({ + index: 'myindex', + type: 'mytype', + id: '1', + body: { + script: 'ctx._source.tags.contains(tag) ? ctx.op = "delete" : ctx.op = "none"', + params: { + tag: 'to-delete' + } + } +}); +--------- + + + +*Params* + +[horizontal] +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the update 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) +`fields`:: +<>, <>, <> -- A comma-separated list of fields to return in the response +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`lang`:: +<> -- The script language (default: painless) +`parent`:: +<> -- ID of the parent document. Is is only used for routing and when for the upsert request +`refresh`:: +<> -- If `true` then refresh the effected 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"` + * `""` + +`retryOnConflict`:: +<> -- Specify how many times should the operation be retried when a conflict occurs (default: 0) +`routing`:: +<> -- Specific routing value +`timeout`:: +<> -- Explicit operation timeout +`version`:: +<> -- Explicit version number for concurrency control +`versionType`:: +<> -- Specific version type +Options::: + * `"internal"` + * `"force"` + +`id`:: +<> -- Document ID +`index`:: +<> -- The name of the index +`type`:: +<> -- The type of the document +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-update.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-updatebyquery-6-5]] +=== `updateByQuery` + +[source,js] +-------- +client.updateByQuery([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-update-by-query.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`from`:: +<> -- Starting offset (default: 0) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[conflicts=abort]`:: +<> -- What to do when the update by query hits version conflicts? +Options::: + * `"abort"` + * `"proceed"` + +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`pipeline`:: +<> -- Ingest pipeline to set on index requests made by this action. (default: none) +`preference`:: +<> -- Specify the node or shard the operation should be performed on (default: random) +`q`:: +<> -- Query in the Lucene query string syntax +`routing`:: +<>, <>, <> -- A comma-separated list of specific routing values +`scroll`:: +<> -- Specify how long a consistent view of the index should be maintained for scrolled search +`searchType`:: +<> -- Search operation type +Options::: + * `"query_then_fetch"` + * `"dfs_query_then_fetch"` + +`searchTimeout`:: +<> -- Explicit timeout for each search request. Defaults to no timeout. +`size`:: +<> -- Number of hits to return (default: 10) +`sort`:: +<>, <>, <> -- A comma-separated list of : pairs +`_source`:: +<>, <>, <> -- True or false to return the _source field or not, or a list of fields to return +`_sourceExclude`:: +<>, <>, <> -- A list of fields to exclude from the returned _source field +`_sourceInclude`:: +<>, <>, <> -- A list of fields to extract and return from the _source field +`terminateAfter`:: +<> -- The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +`stats`:: +<>, <>, <> -- Specific 'tag' of the request for logging and statistical purposes +`version`:: +<> -- Specify whether to return document version as part of a hit +`versionType`:: +<> -- Should the document increment the version number (internal) on hit or not (reindex) +`requestCache`:: +<> -- Specify if request cache should be used for this request or not, defaults to index level setting +`refresh`:: +<> -- Should the effected indexes be refreshed? +`[timeout=1m]`:: +<> -- Time each individual bulk request should wait for shards that are unavailable. +`waitForActiveShards`:: +<> -- Sets the number of shard copies that must be active before proceeding with the update by query 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) +`scrollSize`:: +<> -- Size on the scroll request powering the update by query +`[waitForCompletion=true]`:: +<> -- Should the request should block until the update by query operation is complete. +`requestsPerSecond`:: +<> -- The throttle to set on this request in sub-requests per second. -1 means no throttle. +`[slices=1]`:: +<> -- The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +`index`:: +<>, <>, <> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to search; leave empty to perform the operation on all types +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-update-by-query.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-updatebyqueryrethrottle-6-5]] +=== `updateByQueryRethrottle` + +[source,js] +-------- +client.updateByQueryRethrottle([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-update-by-query.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`requestsPerSecond`:: +<> -- The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. +`taskId`:: +<> -- The task id to rethrottle +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-update-by-query.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-cat-aliases-6-5]] +=== `cat.aliases` + +[source,js] +-------- +client.cat.aliases([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`name`:: +<>, <>, <> -- A comma-separated list of alias names to return + +link:#[back to top] + +[[api-cat-allocation-6-5]] +=== `cat.allocation` + +[source,js] +-------- +client.cat.allocation([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-allocation.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information + +link:#[back to top] + +[[api-cat-count-6-5]] +=== `cat.count` + +[source,js] +-------- +client.cat.count([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-count.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-fielddata-6-5]] +=== `cat.fielddata` + +[source,js] +-------- +client.cat.fielddata([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-fielddata.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`fields`:: +<>, <>, <> -- A comma-separated list of fields to return the fielddata size + +link:#[back to top] + +[[api-cat-health-6-5]] +=== `cat.health` + +[source,js] +-------- +client.cat.health([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-health.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`[ts=true]`:: +<> -- Set to false to disable timestamping +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-help-6-5]] +=== `cat.help` + +[source,js] +-------- +client.cat.help([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by + +link:#[back to top] + +[[api-cat-indices-6-5]] +=== `cat.indices` + +[source,js] +-------- +client.cat.indices([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-indices.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"m"` + * `"g"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`health`:: +<> -- A health status ("green", "yellow", or "red" to filter only indices matching the specified health status +Options::: + * `"green"` + * `"yellow"` + * `"red"` + +`help`:: +<> -- Return help information +`pri`:: +<> -- Set to true to return stats only for primary shards +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-master-6-5]] +=== `cat.master` + +[source,js] +-------- +client.cat.master([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-master.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-nodeattrs-6-5]] +=== `cat.nodeattrs` + +[source,js] +-------- +client.cat.nodeattrs([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-nodeattrs.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-nodes-6-5]] +=== `cat.nodes` + +[source,js] +-------- +client.cat.nodes([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-nodes.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`fullId`:: +<> -- Return the full node ID instead of the shortened version (default: false) +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-pendingtasks-6-5]] +=== `cat.pendingTasks` + +[source,js] +-------- +client.cat.pendingTasks([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-pending-tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-plugins-6-5]] +=== `cat.plugins` + +[source,js] +-------- +client.cat.plugins([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-plugins.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-recovery-6-5]] +=== `cat.recovery` + +[source,js] +-------- +client.cat.recovery([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-recovery.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-repositories-6-5]] +=== `cat.repositories` + +[source,js] +-------- +client.cat.repositories([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-repositories.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-segments-6-5]] +=== `cat.segments` + +[source,js] +-------- +client.cat.segments([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-segments.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-shards-6-5]] +=== `cat.shards` + +[source,js] +-------- +client.cat.shards([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-shards.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`bytes`:: +<> -- The unit in which to display byte values +Options::: + * `"b"` + * `"k"` + * `"kb"` + * `"m"` + * `"mb"` + * `"g"` + * `"gb"` + * `"t"` + * `"tb"` + * `"p"` + * `"pb"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`index`:: +<>, <>, <> -- A comma-separated list of index names to limit the returned information + +link:#[back to top] + +[[api-cat-snapshots-6-5]] +=== `cat.snapshots` + +[source,js] +-------- +client.cat.snapshots([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`ignoreUnavailable`:: +<> -- Set to true to ignore unavailable snapshots +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`repository`:: +<>, <>, <> -- Name of repository from which to fetch the snapshot information + +link:#[back to top] + +[[api-cat-tasks-6-5]] +=== `cat.tasks` + +[source,js] +-------- +client.cat.tasks([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +`actions`:: +<>, <>, <> -- A comma-separated list of actions that should be returned. Leave empty to return all. +`detailed`:: +<> -- Return detailed task information (default: false) +`parentTask`:: +<> -- Return tasks with specified parent task id. Set to -1 to return all. +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-templates-6-5]] +=== `cat.templates` + +[source,js] +-------- +client.cat.templates([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`name`:: +<> -- A pattern that returned template names must match + +link:#[back to top] + +[[api-cat-threadpool-6-5]] +=== `cat.threadPool` + +[source,js] +-------- +client.cat.threadPool([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-thread-pool.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`format`:: +<> -- a short version of the Accept header, e.g. json, yaml +`size`:: +<> -- The multiplier in which to display values +Options::: + * `""` + * `"k"` + * `"m"` + * `"g"` + * `"t"` + * `"p"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`h`:: +<>, <>, <> -- Comma-separated list of column names to display +`help`:: +<> -- Return help information +`s`:: +<>, <>, <> -- Comma-separated list of column names or column aliases to sort by +`v`:: +<> -- Verbose mode. Display column headers +`threadPoolPatterns`:: +<>, <>, <> -- A comma-separated list of regular-expressions to filter the thread pools in the output + +link:#[back to top] + +[[api-cluster-allocationexplain-6-5]] +=== `cluster.allocationExplain` + +[source,js] +-------- +client.cluster.allocationExplain([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-allocation-explain.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`includeYesDecisions`:: +<> -- Return 'YES' decisions in explanation (default: false) +`includeDiskInfo`:: +<> -- Return information about disk usage and shard sizes (default: false) +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-allocation-explain.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-cluster-getsettings-6-5]] +=== `cluster.getSettings` + +[source,js] +-------- +client.cluster.getSettings([params, [callback]]) +-------- + +Get cluster settings (previously set with `putSettings()`) + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-update-settings.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`includeDefaults`:: +<> -- Whether to return all default clusters setting. + +link:#[back to top] + +[[api-cluster-health-6-5]] +=== `cluster.health` + +[source,js] +-------- +client.cluster.health([params, [callback]]) +-------- + +Get a very simple status on the health of the cluster. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-health.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`[level=cluster]`:: +<> -- Specify the level of detail for returned information +Options::: + * `"cluster"` + * `"indices"` + * `"shards"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`waitForActiveShards`:: +<> -- Wait until the specified number of shards is active +`waitForNodes`:: +<> -- Wait until the specified number of nodes is available +`waitForEvents`:: +<> -- Wait until all currently queued events with the given priority are processed +Options::: + * `"immediate"` + * `"urgent"` + * `"high"` + * `"normal"` + * `"low"` + * `"languid"` + +`waitForNoRelocatingShards`:: +<> -- Whether to wait until there are no relocating shards in the cluster +`waitForNoInitializingShards`:: +<> -- Whether to wait until there are no initializing shards in the cluster +`waitForStatus`:: +<> -- Wait until cluster is in a specific state +Options::: + * `"green"` + * `"yellow"` + * `"red"` + +`index`:: +<>, <>, <> -- Limit the information returned to a specific index + +link:#[back to top] + +[[api-cluster-pendingtasks-6-5]] +=== `cluster.pendingTasks` + +[source,js] +-------- +client.cluster.pendingTasks([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-pending.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Specify timeout for connection to master + +link:#[back to top] + +[[api-cluster-putsettings-6-5]] +=== `cluster.putSettings` + +[source,js] +-------- +client.cluster.putSettings([params, [callback]]) +-------- + +Update cluster wide specific settings. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-update-settings.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-update-settings.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-cluster-remoteinfo-6-5]] +=== `cluster.remoteInfo` + +[source,js] +-------- +client.cluster.remoteInfo([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-remote-info.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-cluster-reroute-6-5]] +=== `cluster.reroute` + +[source,js] +-------- +client.cluster.reroute([params, [callback]]) +-------- + +Explicitly execute a cluster reroute allocation command including specific commands. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-reroute.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`dryRun`:: +<> -- Simulate the operation only and return the resulting state +`explain`:: +<> -- Return an explanation of why the commands can or cannot be executed +`retryFailed`:: +<> -- Retries allocation of shards that are blocked due to too many subsequent allocation failures +`metric`:: +<>, <>, <> -- Limit the information returned to the specified metrics. Defaults to all but metadata +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-reroute.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-cluster-state-6-5]] +=== `cluster.state` + +[source,js] +-------- +client.cluster.state([params, [callback]]) +-------- + +Get comprehensive details about the state of the whole cluster (indices settings, allocations, etc). + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-state.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +<> -- Specify timeout for connection to master +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`metric`:: +<>, <>, <> -- Limit the information returned to the specified metrics + +link:#[back to top] + +[[api-cluster-stats-6-5]] +=== `cluster.stats` + +[source,js] +-------- +client.cluster.stats([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-stats.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`timeout`:: +<> -- Explicit operation timeout +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + +link:#[back to top] + +[[api-indices-analyze-6-5]] +=== `indices.analyze` + +[source,js] +-------- +client.indices.analyze([params, [callback]]) +-------- + +Perform the analysis process on a text and return the tokens breakdown of the text. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-analyze.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`index`:: +<> -- The name of the index to scope the operation +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-analyze.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-clearcache-6-5]] +=== `indices.clearCache` + +[source,js] +-------- +client.indices.clearCache([params, [callback]]) +-------- + +Clear either all caches or specific cached associated with one ore more indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-clearcache.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`fieldData`:: +<> -- Clear field data. This is deprecated. Prefer `fielddata`. +`fielddata`:: +<> -- Clear field data +`fields`:: +<>, <>, <> -- A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) +`query`:: +<> -- Clear query caches +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index name to limit the operation +`requestCache`:: +<> -- Clear request cache +`request`:: +<> -- Clear request cache +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-clearcache.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-close-6-5]] +=== `indices.close` + +[source,js] +-------- +client.indices.close([params, [callback]]) +-------- + +Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. + + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-open-close.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma separated list of indices to close +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-open-close.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-create-6-5]] +=== `indices.create` + +[source,js] +-------- +client.indices.create([params, [callback]]) +-------- + +Create an index in Elasticsearch. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-create-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`waitForActiveShards`:: +<> -- Set the number of active shards to wait for before the operation returns. +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`updateAllTypes`:: +<> -- Whether to update the mapping for all fields with the same name across all types or not +`index`:: +<> -- The name of the index +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-create-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-delete-6-5]] +=== `indices.delete` + +[source,js] +-------- +client.indices.delete([params, [callback]]) +-------- + +Delete an index in Elasticsearch + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-delete-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`ignoreUnavailable`:: +<> -- Ignore unavailable indexes (default: false) +`allowNoIndices`:: +<> -- Ignore if a wildcard expression resolves to no concrete indices (default: false) +`[expandWildcards=open]`:: +<> -- Whether wildcard expressions should get expanded to open or closed indices (default: open) +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-delete-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-deletealias-6-5]] +=== `indices.deleteAlias` + +[source,js] +-------- +client.indices.deleteAlias([params, [callback]]) +-------- + +Delete a specific alias. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit timestamp for the document +`masterTimeout`:: +<> -- Specify timeout for connection to master +`index`:: +<>, <>, <> -- A comma-separated list of index names (supports wildcards); use `_all` for all indices +`name`:: +<>, <>, <> -- A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-deletetemplate-6-5]] +=== `indices.deleteTemplate` + +[source,js] +-------- +client.indices.deleteTemplate([params, [callback]]) +-------- + +Delete an index template by its name. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`name`:: +<> -- The name of the template +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-exists-6-5]] +=== `indices.exists` + +[source,js] +-------- +client.indices.exists([params, [callback]]) +-------- + +Return a boolean indicating whether given index exists. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-exists.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +<> -- Ignore unavailable indexes (default: false) +`allowNoIndices`:: +<> -- Ignore if a wildcard expression resolves to no concrete indices (default: false) +`[expandWildcards=open]`:: +<> -- Whether wildcard expressions should get expanded to open or closed indices (default: open) +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`includeDefaults`:: +<> -- Whether to return all default setting for each of the indices. +`index`:: +<>, <>, <> -- A comma-separated list of index names +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-exists.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-existsalias-6-5]] +=== `indices.existsAlias` + +[source,js] +-------- +client.indices.existsAlias([params, [callback]]) +-------- + +Return a boolean indicating whether given alias exists. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=all]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names to filter aliases +`name`:: +<>, <>, <> -- A comma-separated list of alias names to return +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-existstemplate-6-5]] +=== `indices.existsTemplate` + +[source,js] +-------- +client.indices.existsTemplate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`name`:: +<>, <>, <> -- The comma separated names of the index templates +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-existstype-6-5]] +=== `indices.existsType` + +[source,js] +-------- +client.indices.existsType([params, [callback]]) +-------- + +Check if a type/types exists in an index/indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-types-exists.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` to check the types across all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to check +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-types-exists.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-flush-6-5]] +=== `indices.flush` + +[source,js] +-------- +client.indices.flush([params, [callback]]) +-------- + +Explicitly flush one or more indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-flush.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`force`:: +<> -- Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) +`waitIfOngoing`:: +<> -- If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string for all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-flush.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-flushsynced-6-5]] +=== `indices.flushSynced` + +[source,js] +-------- +client.indices.flushSynced([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-synced-flush.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string for all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-synced-flush.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-forcemerge-6-5]] +=== `indices.forcemerge` + +[source,js] +-------- +client.indices.forcemerge([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-forcemerge.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flush`:: +<> -- Specify whether the index should be flushed after performing the operation (default: true) +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`maxNumSegments`:: +<> -- The number of segments the index should be merged into (default: dynamic) +`onlyExpungeDeletes`:: +<> -- Specify whether the operation should only expunge deleted documents +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-forcemerge.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-get-6-5]] +=== `indices.get` + +[source,js] +-------- +client.indices.get([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-get-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +<> -- Ignore unavailable indexes (default: false) +`allowNoIndices`:: +<> -- Ignore if a wildcard expression resolves to no concrete indices (default: false) +`[expandWildcards=open]`:: +<> -- Whether wildcard expressions should get expanded to open or closed indices (default: open) +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`includeDefaults`:: +<> -- Whether to return all default setting for each of the indices. +`masterTimeout`:: +<> -- Specify timeout for connection to master +`index`:: +<>, <>, <> -- A comma-separated list of index names + +link:#[back to top] + +[[api-indices-getalias-6-5]] +=== `indices.getAlias` + +[source,js] +-------- +client.indices.getAlias([params, [callback]]) +-------- + +Retrieve a specified alias. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=all]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names to filter aliases +`name`:: +<>, <>, <> -- A comma-separated list of alias names to return + +link:#[back to top] + +[[api-indices-getfieldmapping-6-5]] +=== `indices.getFieldMapping` + +[source,js] +-------- +client.indices.getFieldMapping([params, [callback]]) +-------- + +Retrieve mapping definition of a specific field. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-get-field-mapping.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`includeDefaults`:: +<> -- Whether the default mapping values should be returned as well +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names +`type`:: +<>, <>, <> -- A comma-separated list of document types +`fields`:: +<>, <>, <> -- A comma-separated list of fields + +link:#[back to top] + +[[api-indices-getmapping-6-5]] +=== `indices.getMapping` + +[source,js] +-------- +client.indices.getMapping([params, [callback]]) +-------- + +Retrieve mapping definition of index or index/type. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-get-mapping.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`masterTimeout`:: +<> -- Specify timeout for connection to master +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names +`type`:: +<>, <>, <> -- A comma-separated list of document types + +link:#[back to top] + +[[api-indices-getsettings-6-5]] +=== `indices.getSettings` + +[source,js] +-------- +client.indices.getSettings([params, [callback]]) +-------- + +Retrieve settings for one or more (or all) indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-get-settings.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Specify timeout for connection to master +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open,closed]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`includeDefaults`:: +<> -- Whether to return all default setting for each of the indices. +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`name`:: +<>, <>, <> -- The name of the settings that should be included + +link:#[back to top] + +[[api-indices-gettemplate-6-5]] +=== `indices.getTemplate` + +[source,js] +-------- +client.indices.getTemplate([params, [callback]]) +-------- + +Retrieve an index template by its name. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`name`:: +<>, <>, <> -- The comma separated names of the index templates + +link:#[back to top] + +[[api-indices-getupgrade-6-5]] +=== `indices.getUpgrade` + +[source,js] +-------- +client.indices.getUpgrade([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-upgrade.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + +[[api-indices-open-6-5]] +=== `indices.open` + +[source,js] +-------- +client.indices.open([params, [callback]]) +-------- + +Open a closed index, making it available for search. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-open-close.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=closed]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`waitForActiveShards`:: +<> -- Sets the number of active shards to wait for before the operation returns. +`index`:: +<>, <>, <> -- A comma separated list of indices to open +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-open-close.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-putalias-6-5]] +=== `indices.putAlias` + +[source,js] +-------- +client.indices.putAlias([params, [callback]]) +-------- + +Create an alias for a specific index/indices. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit timestamp for the document +`masterTimeout`:: +<> -- Specify timeout for connection to master +`index`:: +<>, <>, <> -- A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. +`name`:: +<> -- The name of the alias to be created or updated +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-putmapping-6-5]] +=== `indices.putMapping` + +[source,js] +-------- +client.indices.putMapping([params, [callback]]) +-------- + +Register specific mapping definition for a specific type. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-put-mapping.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`updateAllTypes`:: +<> -- Whether to update the mapping for all fields with the same name across all types or not +`index`:: +<>, <>, <> -- A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. +`type`:: +<> -- The name of the document type +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-put-mapping.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-putsettings-6-5]] +=== `indices.putSettings` + +[source,js] +-------- +client.indices.putSettings([params, [callback]]) +-------- + +Change specific index level settings in real time. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-update-settings.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Specify timeout for connection to master +`timeout`:: +<> -- Explicit operation timeout +`preserveExisting`:: +<> -- Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-update-settings.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-puttemplate-6-5]] +=== `indices.putTemplate` + +[source,js] +-------- +client.indices.putTemplate([params, [callback]]) +-------- + +Create an index template that will automatically be applied to new indices created. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`order`:: +<> -- The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) +`create`:: +<> -- Whether the index template should only be added if new or can also replace an existing one +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`name`:: +<> -- The name of the template +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-recovery-6-5]] +=== `indices.recovery` + +[source,js] +-------- +client.indices.recovery([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-recovery.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`detailed`:: +<> -- Whether to display detailed information about shard recovery +`activeOnly`:: +<> -- Display only those recoveries that are currently on-going +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + +[[api-indices-refresh-6-5]] +=== `indices.refresh` + +[source,js] +-------- +client.indices.refresh([params, [callback]]) +-------- + +Explicitly refresh one or more index, making all operations performed since the last refresh available for search. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-refresh.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-refresh.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-rollover-6-5]] +=== `indices.rollover` + +[source,js] +-------- +client.indices.rollover([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-rollover-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`dryRun`:: +<> -- If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false +`masterTimeout`:: +<> -- Specify timeout for connection to master +`waitForActiveShards`:: +<> -- Set the number of active shards to wait for on the newly created rollover index before the operation returns. +`alias`:: +<> -- The name of the alias to rollover +`newIndex`:: +<> -- The name of the rollover index +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-rollover-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-segments-6-5]] +=== `indices.segments` + +[source,js] +-------- +client.indices.segments([params, [callback]]) +-------- + +Retrieve low level segments information that a Lucene index (shard level) is built with. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-segments.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`verbose`:: +<> -- Includes detailed memory usage by Lucene. +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + +[[api-indices-shardstores-6-5]] +=== `indices.shardStores` + +[source,js] +-------- +client.indices.shardStores([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-shards-stores.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`status`:: +<>, <>, <> -- A comma-separated list of statuses used to filter on shards to get store information for +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + +[[api-indices-shrink-6-5]] +=== `indices.shrink` + +[source,js] +-------- +client.indices.shrink([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-shrink-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`copySettings`:: +<> -- whether or not to copy settings from the source index (defaults to false) +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`waitForActiveShards`:: +<> -- Set the number of active shards to wait for on the shrunken index before the operation returns. +`index`:: +<> -- The name of the source index to shrink +`target`:: +<> -- The name of the target index to shrink into +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-shrink-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-split-6-5]] +=== `indices.split` + +[source,js] +-------- +client.indices.split([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-split-index.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`copySettings`:: +<> -- whether or not to copy settings from the source index (defaults to false) +`timeout`:: +<> -- Explicit operation timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`waitForActiveShards`:: +<> -- Set the number of active shards to wait for on the shrunken index before the operation returns. +`index`:: +<> -- The name of the source index to split +`target`:: +<> -- The name of the target index to split into +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-split-index.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-stats-6-5]] +=== `indices.stats` + +[source,js] +-------- +client.indices.stats([params, [callback]]) +-------- + +Retrieve statistics on different operations happening on an index. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-stats.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`completionFields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) +`fielddataFields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` index metric (supports wildcards) +`fields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) +`groups`:: +<>, <>, <> -- A comma-separated list of search groups for `search` index metric +`[level=indices]`:: +<> -- Return stats aggregated at cluster, index or shard level +Options::: + * `"cluster"` + * `"indices"` + * `"shards"` + +`types`:: +<>, <>, <> -- A comma-separated list of document types for the `indexing` index metric +`includeSegmentFileSizes`:: +<> -- Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`metric`:: +<>, <>, <> -- Limit the information returned the specific metrics. + +link:#[back to top] + +[[api-indices-updatealiases-6-5]] +=== `indices.updateAliases` + +[source,js] +-------- +client.indices.updateAliases([params, [callback]]) +-------- + +Update specified aliases. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html[the elasticsearch docs] for more information pertaining to this method. + +.Perform an atomic alias swap, for a rotating index +[source,js] +--------- +const response = await client.indices.updateAliases({ + body: { + actions: [ + { remove: { index: 'logstash-2014.04', alias: 'logstash-current' } }, + { add: { index: 'logstash-2014.05', alias: 'logstash-current' } } + ] + } +}); +--------- + + + +*Params* + +[horizontal] +`timeout`:: +<> -- Request timeout +`masterTimeout`:: +<> -- Specify timeout for connection to master +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-upgrade-6-5]] +=== `indices.upgrade` + +[source,js] +-------- +client.indices.upgrade([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-upgrade.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`waitForCompletion`:: +<> -- Specify whether the request should block until the all segments are upgraded (default: false) +`onlyAncientSegments`:: +<> -- If true, only ancient (an older Lucene major release) segments will be upgraded +`index`:: +<>, <>, <> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-upgrade.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-indices-validatequery-6-5]] +=== `indices.validateQuery` + +[source,js] +-------- +client.indices.validateQuery([params, [callback]]) +-------- + +Validate a potentially expensive query without executing it. + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-validate.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`explain`:: +<> -- Return detailed information about the error +`ignoreUnavailable`:: +<> -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +<> -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +<> -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`q`:: +<> -- Query in the Lucene query string syntax +`analyzer`:: +<> -- The analyzer to use for the query string +`analyzeWildcard`:: +<> -- Specify whether wildcard and prefix queries should be analyzed (default: false) +`[defaultOperator=OR]`:: +<> -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +<> -- The field to use as default where no field prefix is given in the query string +`lenient`:: +<> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +`rewrite`:: +<> -- Provide a more detailed explanation showing the actual Lucene query that will be executed. +`allShards`:: +<> -- Execute validation on all shards instead of one random shard per index +`index`:: +<>, <>, <> -- A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices +`type`:: +<>, <>, <> -- A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-validate.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-ingest-deletepipeline-6-5]] +=== `ingest.deletePipeline` + +[source,js] +-------- +client.ingest.deletePipeline([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`id`:: +<> -- Pipeline ID +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-ingest-getpipeline-6-5]] +=== `ingest.getPipeline` + +[source,js] +-------- +client.ingest.getPipeline([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`id`:: +<> -- Comma separated list of pipeline ids. Wildcards supported + +link:#[back to top] + +[[api-ingest-processorgrok-6-5]] +=== `ingest.processorGrok` + +[source,js] +-------- +client.ingest.processorGrok([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + + +[[api-ingest-putpipeline-6-5]] +=== `ingest.putPipeline` + +[source,js] +-------- +client.ingest.putPipeline([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`id`:: +<> -- Pipeline ID +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-ingest-simulate-6-5]] +=== `ingest.simulate` + +[source,js] +-------- +client.ingest.simulate([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`verbose`:: +<> -- Verbose mode. Display data output for each processor in executed pipeline +`id`:: +<> -- Pipeline ID +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-nodes-hotthreads-6-5]] +=== `nodes.hotThreads` + +[source,js] +-------- +client.nodes.hotThreads([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-nodes-hot-threads.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`interval`:: +<> -- The interval for the second sampling of threads +`snapshots`:: +<> -- Number of samples of thread stacktrace (default: 10) +`threads`:: +<> -- Specify the number of threads to provide information for (default: 3) +`ignoreIdleThreads`:: +<> -- Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) +`type`:: +<> -- The type to sample (default: cpu) +Options::: + * `"cpu"` + * `"wait"` + * `"block"` + +`timeout`:: +<> -- Explicit operation timeout +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + +link:#[back to top] + +[[api-nodes-info-6-5]] +=== `nodes.info` + +[source,js] +-------- +client.nodes.info([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-nodes-info.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`flatSettings`:: +<> -- Return settings in flat format (default: false) +`timeout`:: +<> -- Explicit operation timeout +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +`metric`:: +<>, <>, <> -- A comma-separated list of metrics you wish returned. Leave empty to return all. + +link:#[back to top] + +[[api-nodes-reloadsecuresettings-6-5]] +=== `nodes.reloadSecureSettings` + +[source,js] +-------- +client.nodes.reloadSecureSettings([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/secure-settings.html#reloadable-secure-settings[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/secure-settings.html#reloadable-secure-settings[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-nodes-stats-6-5]] +=== `nodes.stats` + +[source,js] +-------- +client.nodes.stats([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-nodes-stats.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`completionFields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) +`fielddataFields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` index metric (supports wildcards) +`fields`:: +<>, <>, <> -- A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) +`groups`:: +<> -- A comma-separated list of search groups for `search` index metric +`[level=node]`:: +<> -- Return indices stats aggregated at index, node or shard level +Options::: + * `"indices"` + * `"node"` + * `"shards"` + +`types`:: +<>, <>, <> -- A comma-separated list of document types for the `indexing` index metric +`timeout`:: +<> -- Explicit operation timeout +`includeSegmentFileSizes`:: +<> -- Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) +`metric`:: +<>, <>, <> -- Limit the information returned to the specified metrics +`indexMetric`:: +<>, <>, <> -- Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + +link:#[back to top] + +[[api-nodes-usage-6-5]] +=== `nodes.usage` + +[source,js] +-------- +client.nodes.usage([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-nodes-usage.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`timeout`:: +<> -- Explicit operation timeout +`metric`:: +<>, <>, <> -- Limit the information returned to the specified metrics +`nodeId`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + +link:#[back to top] + +[[api-snapshot-create-6-5]] +=== `snapshot.create` + +[source,js] +-------- +client.snapshot.create([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`waitForCompletion`:: +<> -- Should this request wait until the operation has completed before returning +`repository`:: +<> -- A repository name +`snapshot`:: +<> -- A snapshot name +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-createrepository-6-5]] +=== `snapshot.createRepository` + +[source,js] +-------- +client.snapshot.createRepository([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`verify`:: +<> -- Whether to verify the repository after creation +`repository`:: +<> -- A repository name +`body`:: +<>, <> -- The request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-delete-6-5]] +=== `snapshot.delete` + +[source,js] +-------- +client.snapshot.delete([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`repository`:: +<> -- A repository name +`snapshot`:: +<> -- A snapshot name +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-deleterepository-6-5]] +=== `snapshot.deleteRepository` + +[source,js] +-------- +client.snapshot.deleteRepository([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`repository`:: +<>, <>, <> -- A comma-separated list of repository names +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-get-6-5]] +=== `snapshot.get` + +[source,js] +-------- +client.snapshot.get([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`ignoreUnavailable`:: +<> -- Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown +`verbose`:: +<> -- Whether to show verbose snapshot info or only show the basic info found in the repository index blob +`repository`:: +<> -- A repository name +`snapshot`:: +<>, <>, <> -- A comma-separated list of snapshot names + +link:#[back to top] + +[[api-snapshot-getrepository-6-5]] +=== `snapshot.getRepository` + +[source,js] +-------- +client.snapshot.getRepository([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`local`:: +<> -- Return local information, do not retrieve the state from master node (default: false) +`repository`:: +<>, <>, <> -- A comma-separated list of repository names + +link:#[back to top] + +[[api-snapshot-restore-6-5]] +=== `snapshot.restore` + +[source,js] +-------- +client.snapshot.restore([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`waitForCompletion`:: +<> -- Should this request wait until the operation has completed before returning +`repository`:: +<> -- A repository name +`snapshot`:: +<> -- A snapshot name +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-snapshot-status-6-5]] +=== `snapshot.status` + +[source,js] +-------- +client.snapshot.status([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`ignoreUnavailable`:: +<> -- Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown +`repository`:: +<> -- A repository name +`snapshot`:: +<>, <>, <> -- A comma-separated list of snapshot names + +link:#[back to top] + +[[api-snapshot-verifyrepository-6-5]] +=== `snapshot.verifyRepository` + +[source,js] +-------- +client.snapshot.verifyRepository([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +<> -- Explicit operation timeout for connection to master node +`timeout`:: +<> -- Explicit operation timeout +`repository`:: +<> -- A repository name +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-tasks-cancel-6-5]] +=== `tasks.cancel` + +[source,js] +-------- +client.tasks.cancel([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`nodes`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +`actions`:: +<>, <>, <> -- A comma-separated list of actions that should be cancelled. Leave empty to cancel all. +`parentTaskId`:: +<> -- Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. +`taskId`:: +<> -- Cancel the task with specified task id (node_id:task_number) +`body`:: +<>, <> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tasks.html[the elasticsearch docs] for details about what can be specified here. + +link:#[back to top] + +[[api-tasks-get-6-5]] +=== `tasks.get` + +[source,js] +-------- +client.tasks.get([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`waitForCompletion`:: +<> -- Wait for the matching tasks to complete (default: false) +`timeout`:: +<> -- Explicit operation timeout +`taskId`:: +<> -- Return the task with specified id (node_id:task_number) + +link:#[back to top] + +[[api-tasks-list-6-5]] +=== `tasks.list` + +[source,js] +-------- +client.tasks.list([params, [callback]]) +-------- + +// no description + +Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tasks.html[the elasticsearch docs] for more information pertaining to this method. + +// no examples + + +*Params* + +[horizontal] +`nodes`:: +<>, <>, <> -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +`actions`:: +<>, <>, <> -- A comma-separated list of actions that should be returned. Leave empty to return all. +`detailed`:: +<> -- Return detailed task information (default: false) +`parentTaskId`:: +<> -- Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. +`waitForCompletion`:: +<> -- Wait for the matching tasks to complete (default: false) +`[groupBy=nodes]`:: +<> -- Group tasks by nodes or parent/child relationships +Options::: + * `"nodes"` + * `"parents"` + * `"none"` + +`timeout`:: +<> -- Explicit operation timeout + +link:#[back to top] diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index a6d701005..6e323b4a7 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -52,9 +52,11 @@ Default in Node::: + WARNING: This default will track the latest version of Elasticsearch, and is only intended to be used during development. It is highly recommended that you set this parameter in all code that is headed to production. -Default ::: `'6.3'` +Default ::: `'6.4'` Options in node ::: + * `'6.5'` + * `'6.4'` * `'6.3'` * `'6.2'` * `'6.1'` @@ -73,11 +75,11 @@ Options in node ::: * `'master'` (unstable) Options in the browser ::: + * `'6.5'` + * `'6.4'` * `'6.3'` * `'6.2'` * `'6.1'` - * `'6.0'` - * `'5.6'` * `'6.x'` (unstable) * `'master'` (unstable) @@ -136,7 +138,7 @@ Default::: `30000` Default::: `60000` -`pingTimeout`[[config-ping-timeout]]:: `Number` -- Milliseconds that a ping request can take before timing out. Takes precedence over `requestTimeout` for ping requests. +`pingTimeout`[[config-ping-timeout]]:: `Number` -- Milliseconds that a ping request can take before timing out. Default::: `3000` diff --git a/docs/index.asciidoc b/docs/index.asciidoc index 779f42ac9..f46d16864 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -20,8 +20,12 @@ include::logging.asciidoc[] include::development.asciidoc[] +include::api_methods_6_5.asciidoc[] + include::api_methods.asciidoc[] +include::api_methods_6_3.asciidoc[] + include::api_methods_6_2.asciidoc[] include::api_methods_6_1.asciidoc[] diff --git a/src/lib/apis/6_4.js b/src/lib/apis/6_4.js new file mode 100644 index 000000000..f4dda4c30 --- /dev/null +++ b/src/lib/apis/6_4.js @@ -0,0 +1,7101 @@ +var ca = require('../client_action').makeFactoryWithModifier(function (spec) { + return require('lodash').merge(spec, { + params: { + filterPath: { + type: 'list', + name: 'filter_path' + } + } + }); +}); +var namespace = require('../client_action').namespaceFactory; +var api = module.exports = {}; + +api._namespaces = ['cat', 'cluster', 'indices', 'ingest', 'nodes', 'snapshot', 'tasks']; + +/** + * Perform a [bulk](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-bulk.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the bulk 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 {<>} params.refresh - If `true` then refresh the effected 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 {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.type - Default document type for items which don't provide one + * @param {<>, <>, <>} params.fields - Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request + * @param {<>, <>, <>} params._sourceExclude - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request + * @param {<>, <>, <>} params._sourceInclude - Default list of fields to extract and return from the _source field, can be overridden on each sub-request + * @param {<>} params.pipeline - The pipeline id to preprocess incoming documents with + * @param {<>} params.index - Default index for items which don't provide one + */ +api.bulk = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + type: { + type: 'string' + }, + fields: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + pipeline: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_bulk', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_bulk', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_bulk' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +api.cat = namespace(); + +/** + * Perform a [cat.aliases](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.name - A comma-separated list of alias names to return + */ +api.cat.prototype.aliases = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/aliases/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_cat/aliases' + } + ] +}); + +/** + * Perform a [cat.allocation](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-allocation.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information + */ +api.cat.prototype.allocation = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/allocation/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cat/allocation' + } + ] +}); + +/** + * Perform a [cat.count](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.count = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/count/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/count' + } + ] +}); + +/** + * Perform a [cat.fielddata](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-fielddata.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.fields - A comma-separated list of fields to return the fielddata size + */ +api.cat.prototype.fielddata = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + }, + fields: { + type: 'list' + } + }, + urls: [ + { + fmt: '/_cat/fielddata/<%=fields%>', + req: { + fields: { + type: 'list' + } + } + }, + { + fmt: '/_cat/fielddata' + } + ] +}); + +/** + * Perform a [cat.health](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} [params.ts=true] - Set to false to disable timestamping + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.health = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + ts: { + type: 'boolean', + 'default': true + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/health' + } +}); + +/** + * Perform a [cat.help](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + */ +api.cat.prototype.help = ca({ + params: { + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + } + }, + url: { + fmt: '/_cat' + } +}); + +/** + * Perform a [cat.indices](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-indices.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.health - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status + * @param {<>} params.help - Return help information + * @param {<>} params.pri - Set to true to return stats only for primary shards + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.indices = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + health: { + type: 'enum', + 'default': null, + options: [ + 'green', + 'yellow', + 'red' + ] + }, + help: { + type: 'boolean', + 'default': false + }, + pri: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/indices/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/indices' + } + ] +}); + +/** + * Perform a [cat.master](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-master.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.master = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/master' + } +}); + +/** + * Perform a [cat.nodeattrs](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-nodeattrs.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.nodeattrs = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/nodeattrs' + } +}); + +/** + * Perform a [cat.nodes](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-nodes.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.fullId - Return the full node ID instead of the shortened version (default: false) + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.nodes = ca({ + params: { + format: { + type: 'string' + }, + fullId: { + type: 'boolean', + name: 'full_id' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/nodes' + } +}); + +/** + * Perform a [cat.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-pending-tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.pendingTasks = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/pending_tasks' + } +}); + +/** + * Perform a [cat.plugins](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-plugins.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.plugins = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/plugins' + } +}); + +/** + * Perform a [cat.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.recovery = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/recovery/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/recovery' + } + ] +}); + +/** + * Perform a [cat.repositories](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-repositories.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.repositories = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean', + 'default': false + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/repositories' + } +}); + +/** + * Perform a [cat.segments](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-segments.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.segments = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/segments/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/segments' + } + ] +}); + +/** + * Perform a [cat.shards](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.shards = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/shards/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/shards' + } + ] +}); + +/** + * Perform a [cat.snapshots](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.ignoreUnavailable - Set to true to ignore unavailable snapshots + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.repository - Name of repository from which to fetch the snapshot information + */ +api.cat.prototype.snapshots = ca({ + params: { + format: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + 'default': false, + name: 'ignore_unavailable' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/snapshots/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + { + fmt: '/_cat/snapshots' + } + ] +}); + +/** + * Perform a [cat.tasks](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {<>, <>, <>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all. + * @param {<>} params.detailed - Return detailed task information (default: false) + * @param {<>} params.parentTask - Return tasks with specified parent task id. Set to -1 to return all. + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.tasks = ca({ + params: { + format: { + type: 'string' + }, + nodeId: { + type: 'list', + name: 'node_id' + }, + actions: { + type: 'list' + }, + detailed: { + type: 'boolean' + }, + parentTask: { + type: 'number', + name: 'parent_task' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/tasks' + } +}); + +/** + * Perform a [cat.templates](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>} params.name - A pattern that returned template names must match + */ +api.cat.prototype.templates = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/templates/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + { + fmt: '/_cat/templates' + } + ] +}); + +/** + * Perform a [cat.threadPool](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cat-thread-pool.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.size - The multiplier in which to display values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.threadPoolPatterns - A comma-separated list of regular-expressions to filter the thread pools in the output + */ +api.cat.prototype.threadPool = ca({ + params: { + format: { + type: 'string' + }, + size: { + type: 'enum', + options: [ + '', + 'k', + 'm', + 'g', + 't', + 'p' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/thread_pool/<%=threadPoolPatterns%>', + req: { + threadPoolPatterns: { + type: 'list' + } + } + }, + { + fmt: '/_cat/thread_pool' + } + ] +}); + +/** + * Perform a [clearScroll](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.scrollId - A comma-separated list of scroll IDs to clear + */ +api.clearScroll = ca({ + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'list' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + paramAsBody: { + param: 'scrollId', + body: 'scroll_id' + }, + method: 'DELETE' +}); + +api.cluster = namespace(); + +/** + * Perform a [cluster.allocationExplain](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-allocation-explain.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.includeYesDecisions - Return 'YES' decisions in explanation (default: false) + * @param {<>} params.includeDiskInfo - Return information about disk usage and shard sizes (default: false) + */ +api.cluster.prototype.allocationExplain = ca({ + params: { + includeYesDecisions: { + type: 'boolean', + name: 'include_yes_decisions' + }, + includeDiskInfo: { + type: 'boolean', + name: 'include_disk_info' + } + }, + url: { + fmt: '/_cluster/allocation/explain' + }, + method: 'POST' +}); + +/** + * Perform a [cluster.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.includeDefaults - Whether to return all default clusters setting. + */ +api.cluster.prototype.getSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + includeDefaults: { + type: 'boolean', + 'default': false, + name: 'include_defaults' + } + }, + url: { + fmt: '/_cluster/settings' + } +}); + +/** + * Perform a [cluster.health](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} [params.level=cluster] - Specify the level of detail for returned information + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.waitForActiveShards - Wait until the specified number of shards is active + * @param {<>} params.waitForNodes - Wait until the specified number of nodes is available + * @param {<>} params.waitForEvents - Wait until all currently queued events with the given priority are processed + * @param {<>} params.waitForNoRelocatingShards - Whether to wait until there are no relocating shards in the cluster + * @param {<>} params.waitForNoInitializingShards - Whether to wait until there are no initializing shards in the cluster + * @param {<>} params.waitForStatus - Wait until cluster is in a specific state + * @param {<>, <>, <>} params.index - Limit the information returned to a specific index + */ +api.cluster.prototype.health = ca({ + params: { + level: { + type: 'enum', + 'default': 'cluster', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + waitForNodes: { + type: 'string', + name: 'wait_for_nodes' + }, + waitForEvents: { + type: 'enum', + options: [ + 'immediate', + 'urgent', + 'high', + 'normal', + 'low', + 'languid' + ], + name: 'wait_for_events' + }, + waitForNoRelocatingShards: { + type: 'boolean', + name: 'wait_for_no_relocating_shards' + }, + waitForNoInitializingShards: { + type: 'boolean', + name: 'wait_for_no_initializing_shards' + }, + waitForStatus: { + type: 'enum', + 'default': null, + options: [ + 'green', + 'yellow', + 'red' + ], + name: 'wait_for_status' + } + }, + urls: [ + { + fmt: '/_cluster/health/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/health' + } + ] +}); + +/** + * Perform a [cluster.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-pending.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Specify timeout for connection to master + */ +api.cluster.prototype.pendingTasks = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_cluster/pending_tasks' + } +}); + +/** + * Perform a [cluster.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.putSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/settings' + }, + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [cluster.remoteInfo](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-remote-info.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.cluster.prototype.remoteInfo = ca({ + url: { + fmt: '/_remote/info' + } +}); + +/** + * Perform a [cluster.reroute](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-reroute.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.dryRun - Simulate the operation only and return the resulting state + * @param {<>} params.explain - Return an explanation of why the commands can or cannot be executed + * @param {<>} params.retryFailed - Retries allocation of shards that are blocked due to too many subsequent allocation failures + * @param {<>, <>, <>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.reroute = ca({ + params: { + dryRun: { + type: 'boolean', + name: 'dry_run' + }, + explain: { + type: 'boolean' + }, + retryFailed: { + type: 'boolean', + name: 'retry_failed' + }, + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'master_node', + 'version' + ] + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/reroute' + }, + method: 'POST' +}); + +/** + * Perform a [cluster.state](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-state.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.metric - Limit the information returned to the specified metrics + */ +api.cluster.prototype.state = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/_cluster/state/<%=metric%>/<%=index%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'routing_nodes', + 'master_node', + 'version' + ] + }, + index: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/state/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'routing_nodes', + 'master_node', + 'version' + ] + } + } + }, + { + fmt: '/_cluster/state' + } + ] +}); + +/** + * Perform a [cluster.stats](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.cluster.prototype.stats = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_cluster/stats/nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/stats' + } + ] +}); + +/** + * Perform a [count](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.minScore - Include only documents with a specific `_score` value in the result + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.terminateAfter - The maximum count for each shard, upon reaching which the query execution will terminate early + * @param {<>, <>, <>} params.index - A comma-separated list of indices to restrict the results + * @param {<>, <>, <>} params.type - A comma-separated list of types to restrict the results + */ +api.count = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + minScore: { + type: 'number', + name: 'min_score' + }, + preference: { + type: 'string' + }, + routing: { + type: 'list' + }, + q: { + type: 'string' + }, + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + lenient: { + type: 'boolean' + }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_count', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_count', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_count' + } + ], + method: 'POST' +}); + +/** + * Perform a [create](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} 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 {<>} params.parent - ID of the parent document + * @param {<>} 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 {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.pipeline - The pipeline id to preprocess incoming documents with + * @param {<>} params.id - Document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.create = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + }, + pipeline: { + type: 'string' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_create', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [delete](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-delete.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete 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 {<>} params.parent - ID of parent document + * @param {<>} params.refresh - If `true` then refresh the effected 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 {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api['delete'] = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [deleteByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.from - Starting offset (default: 0) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.conflicts=abort] - What to do when the delete by query hits version conflicts? + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.searchType - Search operation type + * @param {<>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout. + * @param {<>} params.size - Number of hits to return (default: 10) + * @param {<>, <>, <>} params.sort - A comma-separated list of : pairs + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * @param {<>, <>, <>} params.stats - Specific 'tag' of the request for logging and statistical purposes + * @param {<>} params.version - Specify whether to return document version as part of a hit + * @param {<>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting + * @param {<>} params.refresh - Should the effected indexes be refreshed? + * @param {<>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete by query 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 {<>} params.scrollSize - Size on the scroll request powering the delete by query + * @param {<>} [params.waitForCompletion=true] - Should the request should block until the delete by query is complete. + * @param {<>} params.requestsPerSecond - The throttle for this request in sub-requests per second. -1 means no throttle. + * @param {<>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.deleteByQuery = ca({ + params: { + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + from: { + type: 'number' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + conflicts: { + type: 'enum', + 'default': 'abort', + options: [ + 'abort', + 'proceed' + ] + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + lenient: { + type: 'boolean' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'time' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'dfs_query_then_fetch' + ], + name: 'search_type' + }, + searchTimeout: { + type: 'time', + name: 'search_timeout' + }, + size: { + type: 'number' + }, + sort: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + }, + stats: { + type: 'list' + }, + version: { + type: 'boolean' + }, + requestCache: { + type: 'boolean', + name: 'request_cache' + }, + refresh: { + type: 'boolean' + }, + timeout: { + type: 'time', + 'default': '1m' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + scrollSize: { + type: 'number', + name: 'scroll_size' + }, + waitForCompletion: { + type: 'boolean', + 'default': true, + name: 'wait_for_completion' + }, + requestsPerSecond: { + type: 'number', + 'default': 0, + name: 'requests_per_second' + }, + slices: { + type: 'number', + 'default': 1 + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_delete_by_query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_delete_by_query', + req: { + index: { + type: 'list' + } + } + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [deleteScript](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-scripting.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.id - Script ID + */ +api.deleteScript = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_scripts/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [exists](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return in the response + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.exists = ca({ + params: { + storedFields: { + type: 'list', + name: 'stored_fields' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [existsSource](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types + */ +api.existsSource = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_source', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [explain](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-explain.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) + * @param {<>} params.analyzer - The analyzer for the query string query + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The default field for query string query (default: _all) + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return in the response + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.explain = ca({ + params: { + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + analyzer: { + type: 'string' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + storedFields: { + type: 'list', + name: 'stored_fields' + }, + lenient: { + type: 'boolean' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [fieldCaps](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-field-caps.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.fields - A comma-separated list of field names + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.fieldCaps = ca({ + params: { + fields: { + type: 'list' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_field_caps', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_field_caps' + } + ], + method: 'POST' +}); + +/** + * Perform a [get](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return in the response + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.get = ca({ + params: { + storedFields: { + type: 'list', + name: 'stored_fields' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [getScript](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-scripting.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.id - Script ID + */ +api.getScript = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_scripts/<%=id%>', + req: { + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [getSource](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types + */ +api.getSource = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_source', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [index](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} 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 {<>} [params.opType=index] - Explicit operation type + * @param {<>} params.parent - ID of the parent document + * @param {<>} 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 {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.pipeline - The pipeline id to preprocess incoming documents with + * @param {<>} params.id - Document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.index = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + opType: { + type: 'enum', + 'default': 'index', + options: [ + 'index', + 'create' + ], + name: 'op_type' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + }, + pipeline: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'POST' +}); + +api.indices = namespace(); + +/** + * Perform a [indices.analyze](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-analyze.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.index - The name of the index to scope the operation + */ +api.indices.prototype.analyze = ca({ + params: { + index: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/_analyze', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_analyze' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.clearCache](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-clearcache.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.fieldData - Clear field data. This is deprecated. Prefer `fielddata`. + * @param {<>} params.fielddata - Clear field data + * @param {<>, <>, <>} params.fields - A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) + * @param {<>} params.query - Clear query caches + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index name to limit the operation + * @param {<>} params.requestCache - Clear request cache + * @param {<>} params.request - Clear request cache + */ +api.indices.prototype.clearCache = ca({ + params: { + fieldData: { + type: 'boolean', + name: 'field_data' + }, + fielddata: { + type: 'boolean' + }, + fields: { + type: 'list' + }, + query: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + index: { + type: 'list' + }, + requestCache: { + type: 'boolean', + name: 'request_cache' + }, + request: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_cache/clear', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cache/clear' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.close](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma separated list of indices to close + */ +api.indices.prototype.close = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>/_close', + req: { + index: { + type: 'list' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.create](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-create-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForActiveShards - Set the number of active shards to wait for before the operation returns. + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not + * @param {<>} params.index - The name of the index + */ +api.indices.prototype.create = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + updateAllTypes: { + type: 'boolean', + name: 'update_all_types' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'string' + } + } + }, + method: 'PUT' +}); + +/** + * Perform a [indices.delete](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-delete-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Ignore unavailable indexes (default: false) + * @param {<>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false) + * @param {<>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open) + * @param {<>, <>, <>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices + */ +api.indices.prototype['delete'] = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteAlias](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit timestamp for the document + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>, <>, <>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices + * @param {<>, <>, <>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. + */ +api.indices.prototype.deleteAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.name - The name of the template + */ +api.indices.prototype.deleteTemplate = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.exists](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-exists.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.ignoreUnavailable - Ignore unavailable indexes (default: false) + * @param {<>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false) + * @param {<>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open) + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.includeDefaults - Whether to return all default setting for each of the indices. + * @param {<>, <>, <>} params.index - A comma-separated list of index names + */ +api.indices.prototype.exists = ca({ + params: { + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + includeDefaults: { + type: 'boolean', + 'default': false, + name: 'include_defaults' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsAlias](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=all] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names to filter aliases + * @param {<>, <>, <>} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.existsAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'all', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + } + ], + method: 'HEAD' +}); + +/** + * Perform a [indices.existsTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.name - The comma separated names of the index templates + */ +api.indices.prototype.existsTemplate = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsType](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-types-exists.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to check + */ +api.indices.prototype.existsType = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.flush](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-flush.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) + * @param {<>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.flush = ca({ + params: { + force: { + type: 'boolean' + }, + waitIfOngoing: { + type: 'boolean', + name: 'wait_if_ongoing' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_flush', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_flush' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.flushSynced](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-synced-flush.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.flushSynced = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_flush/synced', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_flush/synced' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.forcemerge](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-forcemerge.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flush - Specify whether the index should be flushed after performing the operation (default: true) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic) + * @param {<>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.forcemerge = ca({ + params: { + flush: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + maxNumSegments: { + type: 'number', + name: 'max_num_segments' + }, + onlyExpungeDeletes: { + type: 'boolean', + name: 'only_expunge_deletes' + } + }, + urls: [ + { + fmt: '/<%=index%>/_forcemerge', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_forcemerge' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.get](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-get-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.ignoreUnavailable - Ignore unavailable indexes (default: false) + * @param {<>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false) + * @param {<>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open) + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.includeDefaults - Whether to return all default setting for each of the indices. + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>, <>, <>} params.index - A comma-separated list of index names + */ +api.indices.prototype.get = ca({ + params: { + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + includeDefaults: { + type: 'boolean', + 'default': false, + name: 'include_defaults' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + } +}); + +/** + * Perform a [indices.getAlias](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=all] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names to filter aliases + * @param {<>, <>, <>} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.getAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'all', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_alias', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_alias' + } + ] +}); + +/** + * Perform a [indices.getFieldMapping](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-get-field-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.includeDefaults - Whether the default mapping values should be returned as well + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names + * @param {<>, <>, <>} params.type - A comma-separated list of document types + * @param {<>, <>, <>} params.fields - A comma-separated list of fields + */ +api.indices.prototype.getFieldMapping = ca({ + params: { + includeDefaults: { + type: 'boolean', + name: 'include_defaults' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + fields: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping/field/<%=fields%>', + req: { + index: { + type: 'list' + }, + fields: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>/field/<%=fields%>', + req: { + type: { + type: 'list' + }, + fields: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/field/<%=fields%>', + req: { + fields: { + type: 'list' + } + } + } + ] +}); + +/** + * Perform a [indices.getMapping](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-get-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names + * @param {<>, <>, <>} params.type - A comma-separated list of document types + */ +api.indices.prototype.getMapping = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'list' + } + } + }, + { + fmt: '/_mapping' + } + ] +}); + +/** + * Perform a [indices.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-get-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.includeDefaults - Whether to return all default setting for each of the indices. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.name - The name of the settings that should be included + */ +api.indices.prototype.getSettings = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': [ + 'open', + 'closed' + ], + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + local: { + type: 'boolean' + }, + includeDefaults: { + type: 'boolean', + 'default': false, + name: 'include_defaults' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ] +}); + +/** + * Perform a [indices.getTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.name - The comma separated names of the index templates + */ +api.indices.prototype.getTemplate = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_template' + } + ] +}); + +/** + * Perform a [indices.getUpgrade](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-upgrade.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.getUpgrade = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_upgrade', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_upgrade' + } + ] +}); + +/** + * Perform a [indices.open](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.waitForActiveShards - Sets the number of active shards to wait for before the operation returns. + * @param {<>, <>, <>} params.index - A comma separated list of indices to open + */ +api.indices.prototype.open = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'closed', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + } + }, + url: { + fmt: '/<%=index%>/_open', + req: { + index: { + type: 'list' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.putAlias](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit timestamp for the document + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>, <>, <>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. + * @param {<>} params.name - The name of the alias to be created or updated + */ +api.indices.prototype.putAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + method: 'PUT' +}); + +/** + * Perform a [indices.putMapping](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-put-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not + * @param {<>, <>, <>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. + * @param {<>} params.type - The name of the document type + */ +api.indices.prototype.putMapping = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + updateAllTypes: { + type: 'boolean', + name: 'update_all_types' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.preserveExisting - Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.putSettings = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + preserveExisting: { + type: 'boolean', + name: 'preserve_existing' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) + * @param {<>} params.create - Whether the index template should only be added if new or can also replace an existing one + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.name - The name of the template + */ +api.indices.prototype.putTemplate = ca({ + params: { + order: { + type: 'number' + }, + create: { + type: 'boolean', + 'default': false + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.detailed - Whether to display detailed information about shard recovery + * @param {<>} params.activeOnly - Display only those recoveries that are currently on-going + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.recovery = ca({ + params: { + detailed: { + type: 'boolean', + 'default': false + }, + activeOnly: { + type: 'boolean', + 'default': false, + name: 'active_only' + } + }, + urls: [ + { + fmt: '/<%=index%>/_recovery', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_recovery' + } + ] +}); + +/** + * Perform a [indices.refresh](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-refresh.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.refresh = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_refresh', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_refresh' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.rollover](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-rollover-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.dryRun - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.waitForActiveShards - Set the number of active shards to wait for on the newly created rollover index before the operation returns. + * @param {<>} params.alias - The name of the alias to rollover + * @param {<>} params.newIndex - The name of the rollover index + */ +api.indices.prototype.rollover = ca({ + params: { + timeout: { + type: 'time' + }, + dryRun: { + type: 'boolean', + name: 'dry_run' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + } + }, + urls: [ + { + fmt: '/<%=alias%>/_rollover/<%=newIndex%>', + req: { + alias: { + type: 'string' + }, + newIndex: { + type: 'string' + } + } + }, + { + fmt: '/<%=alias%>/_rollover', + req: { + alias: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.segments](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-segments.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.verbose - Includes detailed memory usage by Lucene. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.segments = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + verbose: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/<%=index%>/_segments', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_segments' + } + ] +}); + +/** + * Perform a [indices.shardStores](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-shards-stores.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.status - A comma-separated list of statuses used to filter on shards to get store information for + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.shardStores = ca({ + params: { + status: { + type: 'list', + options: [ + 'green', + 'yellow', + 'red', + 'all' + ] + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_shard_stores', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_shard_stores' + } + ] +}); + +/** + * Perform a [indices.shrink](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-shrink-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.copySettings - whether or not to copy settings from the source index (defaults to false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.waitForActiveShards - Set the number of active shards to wait for on the shrunken index before the operation returns. + * @param {<>} params.index - The name of the source index to shrink + * @param {<>} params.target - The name of the target index to shrink into + */ +api.indices.prototype.shrink = ca({ + params: { + copySettings: { + type: 'boolean', + name: 'copy_settings' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + } + }, + url: { + fmt: '/<%=index%>/_shrink/<%=target%>', + req: { + index: { + type: 'string' + }, + target: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.split](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-split-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.copySettings - whether or not to copy settings from the source index (defaults to false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.waitForActiveShards - Set the number of active shards to wait for on the shrunken index before the operation returns. + * @param {<>} params.index - The name of the source index to split + * @param {<>} params.target - The name of the target index to split into + */ +api.indices.prototype.split = ca({ + params: { + copySettings: { + type: 'boolean', + name: 'copy_settings' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + } + }, + url: { + fmt: '/<%=index%>/_split/<%=target%>', + req: { + index: { + type: 'string' + }, + target: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.stats](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {<>, <>, <>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {<>, <>, <>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {<>, <>, <>} params.groups - A comma-separated list of search groups for `search` index metric + * @param {<>} [params.level=indices] - Return stats aggregated at cluster, index or shard level + * @param {<>, <>, <>} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {<>} params.includeSegmentFileSizes - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.metric - Limit the information returned the specific metrics. + */ +api.indices.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'list' + }, + level: { + type: 'enum', + 'default': 'indices', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + types: { + type: 'list' + }, + includeSegmentFileSizes: { + type: 'boolean', + 'default': false, + name: 'include_segment_file_sizes' + } + }, + urls: [ + { + fmt: '/<%=index%>/_stats/<%=metric%>', + req: { + index: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'query_cache', + 'flush', + 'get', + 'indexing', + 'merge', + 'request_cache', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer', + 'suggest' + ] + } + } + }, + { + fmt: '/_stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'query_cache', + 'flush', + 'get', + 'indexing', + 'merge', + 'request_cache', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer', + 'suggest' + ] + } + } + }, + { + fmt: '/<%=index%>/_stats', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_stats' + } + ] +}); + +/** + * Perform a [indices.updateAliases](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Request timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + */ +api.indices.prototype.updateAliases = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_aliases' + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [indices.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-upgrade.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false) + * @param {<>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.upgrade = ca({ + params: { + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + waitForCompletion: { + type: 'boolean', + name: 'wait_for_completion' + }, + onlyAncientSegments: { + type: 'boolean', + name: 'only_ancient_segments' + } + }, + urls: [ + { + fmt: '/<%=index%>/_upgrade', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_upgrade' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.validateQuery](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-validate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.explain - Return detailed information about the error + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed. + * @param {<>} params.allShards - Execute validation on all shards instead of one random shard per index + * @param {<>, <>, <>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types + */ +api.indices.prototype.validateQuery = ca({ + params: { + explain: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + q: { + type: 'string' + }, + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + lenient: { + type: 'boolean' + }, + rewrite: { + type: 'boolean' + }, + allShards: { + type: 'boolean', + name: 'all_shards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_validate/query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_validate/query', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_validate/query' + } + ], + method: 'POST' +}); + +/** + * Perform a [info](http://www.elastic.co/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.info = ca({ + url: { + fmt: '/' + } +}); + +api.ingest = namespace(); + +/** + * Perform a [ingest.deletePipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.id - Pipeline ID + */ +api.ingest.prototype.deletePipeline = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_ingest/pipeline/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [ingest.getPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.id - Comma separated list of pipeline ids. Wildcards supported + */ +api.ingest.prototype.getPipeline = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + urls: [ + { + fmt: '/_ingest/pipeline/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + { + fmt: '/_ingest/pipeline' + } + ] +}); + +/** + * Perform a [ingest.processorGrok](https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.ingest.prototype.processorGrok = ca({ + url: { + fmt: '/_ingest/processor/grok' + } +}); + +/** + * Perform a [ingest.putPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.id - Pipeline ID + */ +api.ingest.prototype.putPipeline = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_ingest/pipeline/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [ingest.simulate](https://www.elastic.co/guide/en/elasticsearch/plugins/6.4/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.verbose - Verbose mode. Display data output for each processor in executed pipeline + * @param {<>} params.id - Pipeline ID + */ +api.ingest.prototype.simulate = ca({ + params: { + verbose: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_ingest/pipeline/<%=id%>/_simulate', + req: { + id: { + type: 'string' + } + } + }, + { + fmt: '/_ingest/pipeline/_simulate' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [mget](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-multi-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return in the response + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.mget = ca({ + params: { + storedFields: { + type: 'list', + name: 'stored_fields' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mget', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mget', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mget' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [msearch](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-multi-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.searchType - Search operation type + * @param {<>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute + * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * @param {<>} [params.preFilterShardSize=128] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to use as default + * @param {<>, <>, <>} params.type - A comma-separated list of document types to use as default + */ +api.msearch = ca({ + params: { + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch' + ], + name: 'search_type' + }, + maxConcurrentSearches: { + type: 'number', + name: 'max_concurrent_searches' + }, + typedKeys: { + type: 'boolean', + name: 'typed_keys' + }, + preFilterShardSize: { + type: 'number', + 'default': 128, + name: 'pre_filter_shard_size' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_msearch', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_msearch', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_msearch' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [msearchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-multi-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.searchType - Search operation type + * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * @param {<>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute + * @param {<>, <>, <>} params.index - A comma-separated list of index names to use as default + * @param {<>, <>, <>} params.type - A comma-separated list of document types to use as default + */ +api.msearchTemplate = ca({ + params: { + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch' + ], + name: 'search_type' + }, + typedKeys: { + type: 'boolean', + name: 'typed_keys' + }, + maxConcurrentSearches: { + type: 'number', + name: 'max_concurrent_searches' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_msearch/template', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_msearch/template', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_msearch/template' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [mtermvectors](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-multi-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + * @param {<>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>, <>, <>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true). + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.index - The index in which the document resides. + * @param {<>} params.type - The type of the document. + */ +api.mtermvectors = ca({ + params: { + ids: { + type: 'list', + required: false + }, + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + }, + realtime: { + type: 'boolean', + required: false + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mtermvectors', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mtermvectors', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mtermvectors' + } + ], + method: 'POST' +}); + +api.nodes = namespace(); + +/** + * Perform a [nodes.hotThreads](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-nodes-hot-threads.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.interval - The interval for the second sampling of threads + * @param {<>} params.snapshots - Number of samples of thread stacktrace (default: 10) + * @param {<>} params.threads - Specify the number of threads to provide information for (default: 3) + * @param {<>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) + * @param {<>} params.type - The type to sample (default: cpu) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.hotThreads = ca({ + params: { + interval: { + type: 'time' + }, + snapshots: { + type: 'number' + }, + threads: { + type: 'number' + }, + ignoreIdleThreads: { + type: 'boolean', + name: 'ignore_idle_threads' + }, + type: { + type: 'enum', + options: [ + 'cpu', + 'wait', + 'block' + ] + }, + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/hotthreads', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/hotthreads' + } + ] +}); + +/** + * Perform a [nodes.info](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-nodes-info.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {<>, <>, <>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all. + */ +api.nodes.prototype.info = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'transport', + 'http', + 'plugins', + 'ingest' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'transport', + 'http', + 'plugins', + 'ingest' + ] + } + } + }, + { + fmt: '/_nodes' + } + ] +}); + +/** + * Perform a [nodes.reloadSecureSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/secure-settings.html#reloadable-secure-settings) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. + */ +api.nodes.prototype.reloadSecureSettings = ca({ + params: { + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/reload_secure_settings', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/reload_secure_settings' + } + ], + method: 'POST' +}); + +/** + * Perform a [nodes.stats](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-nodes-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {<>, <>, <>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {<>, <>, <>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {<>} params.groups - A comma-separated list of search groups for `search` index metric + * @param {<>} [params.level=node] - Return indices stats aggregated at index, node or shard level + * @param {<>, <>, <>} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.includeSegmentFileSizes - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) + * @param {<>, <>, <>} params.metric - Limit the information returned to the specified metrics + * @param {<>, <>, <>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'boolean' + }, + level: { + type: 'enum', + 'default': 'node', + options: [ + 'indices', + 'node', + 'shards' + ] + }, + types: { + type: 'list' + }, + timeout: { + type: 'time' + }, + includeSegmentFileSizes: { + type: 'boolean', + 'default': false, + name: 'include_segment_file_sizes' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'os', + 'process', + 'thread_pool', + 'transport', + 'discovery' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'query_cache', + 'flush', + 'get', + 'indexing', + 'merge', + 'request_cache', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer', + 'suggest' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'os', + 'process', + 'thread_pool', + 'transport', + 'discovery' + ] + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'os', + 'process', + 'thread_pool', + 'transport', + 'discovery' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'query_cache', + 'flush', + 'get', + 'indexing', + 'merge', + 'request_cache', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer', + 'suggest' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'os', + 'process', + 'thread_pool', + 'transport', + 'discovery' + ] + } + } + }, + { + fmt: '/_nodes/stats' + } + ] +}); + +/** + * Perform a [nodes.usage](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/cluster-nodes-usage.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.metric - Limit the information returned to the specified metrics + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.usage = ca({ + params: { + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/usage/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'rest_actions' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/usage', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/usage/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'rest_actions' + ] + } + } + }, + { + fmt: '/_nodes/usage' + } + ] +}); + +/** + * Perform a [ping](http://www.elastic.co/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.ping = ca({ + url: { + fmt: '/' + }, + method: 'HEAD' +}); + +/** + * Perform a [putScript](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-scripting.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.context - Script context + * @param {<>} params.id - Script ID + */ +api.putScript = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + context: { + type: 'string' + } + }, + urls: [ + { + fmt: '/_scripts/<%=id%>/<%=context%>', + req: { + id: { + type: 'string' + }, + context: { + type: 'string' + } + } + }, + { + fmt: '/_scripts/<%=id%>', + req: { + id: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [rankEval](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-rank-eval.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + */ +api.rankEval = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_rank_eval', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_rank_eval' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-reindex.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.refresh - Should the effected indexes be refreshed? + * @param {<>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the reindex 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 {<>} [params.waitForCompletion=true] - Should the request should block until the reindex is complete. + * @param {<>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle. + * @param {<>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + */ +api.reindex = ca({ + params: { + refresh: { + type: 'boolean' + }, + timeout: { + type: 'time', + 'default': '1m' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + waitForCompletion: { + type: 'boolean', + 'default': true, + name: 'wait_for_completion' + }, + requestsPerSecond: { + type: 'number', + 'default': 0, + name: 'requests_per_second' + }, + slices: { + type: 'number', + 'default': 1 + } + }, + url: { + fmt: '/_reindex' + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [reindexRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-reindex.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.reindexRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_reindex/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [renderSearchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-template.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.id - The id of the stored search template + */ +api.renderSearchTemplate = ca({ + urls: [ + { + fmt: '/_render/template/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + { + fmt: '/_render/template' + } + ], + method: 'POST' +}); + +/** + * Perform a [scriptsPainlessExecute](https://www.elastic.co/guide/en/elasticsearch/painless/6.4/painless-execute-api.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.scriptsPainlessExecute = ca({ + url: { + fmt: '/_scripts/painless/_execute' + }, + method: 'POST' +}); + +/** + * Perform a [scroll](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.scrollId - The scroll ID + */ +api.scroll = ca({ + params: { + scroll: { + type: 'time' + }, + scrollId: { + type: 'string', + name: 'scroll_id' + } + }, + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'string' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + paramAsBody: { + param: 'scrollId', + body: 'scroll_id' + }, + method: 'POST' +}); + +/** + * Perform a [search](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.explain - Specify whether to return detailed information about score computation as part of a hit + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return as part of a hit + * @param {<>, <>, <>} params.docvalueFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit + * @param {<>} params.from - Starting offset (default: 0) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.searchType - Search operation type + * @param {<>} params.size - Number of hits to return (default: 10) + * @param {<>, <>, <>} params.sort - A comma-separated list of : pairs + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * @param {<>, <>, <>} params.stats - Specific 'tag' of the request for logging and statistical purposes + * @param {<>} params.suggestField - Specify which field to use for suggestions + * @param {<>} [params.suggestMode=missing] - Specify suggest mode + * @param {<>} params.suggestSize - How many suggestions to return in response + * @param {<>} params.suggestText - The source text for which the suggestions should be returned + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting + * @param {<>} params.trackTotalHits - Indicate if the number of documents that match the query should be tracked + * @param {<>} [params.allowPartialSearchResults=true] - Indicate if an error should be returned if there is a partial search failure or timeout + * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * @param {<>} params.version - Specify whether to return document version as part of a hit + * @param {<>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting + * @param {<>} [params.batchedReduceSize=512] - The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. + * @param {<>} [params.maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.] - The number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + * @param {<>} [params.preFilterShardSize=128] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.search = ca({ + params: { + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + explain: { + type: 'boolean' + }, + storedFields: { + type: 'list', + name: 'stored_fields' + }, + docvalueFields: { + type: 'list', + name: 'docvalue_fields' + }, + from: { + type: 'number' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + lenient: { + type: 'boolean' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'time' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'dfs_query_then_fetch' + ], + name: 'search_type' + }, + size: { + type: 'number' + }, + sort: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + }, + stats: { + type: 'list' + }, + suggestField: { + type: 'string', + name: 'suggest_field' + }, + suggestMode: { + type: 'enum', + 'default': 'missing', + options: [ + 'missing', + 'popular', + 'always' + ], + name: 'suggest_mode' + }, + suggestSize: { + type: 'number', + name: 'suggest_size' + }, + suggestText: { + type: 'string', + name: 'suggest_text' + }, + timeout: { + type: 'time' + }, + trackScores: { + type: 'boolean', + name: 'track_scores' + }, + trackTotalHits: { + type: 'boolean', + name: 'track_total_hits' + }, + allowPartialSearchResults: { + type: 'boolean', + 'default': true, + name: 'allow_partial_search_results' + }, + typedKeys: { + type: 'boolean', + name: 'typed_keys' + }, + version: { + type: 'boolean' + }, + requestCache: { + type: 'boolean', + name: 'request_cache' + }, + batchedReduceSize: { + type: 'number', + 'default': 512, + name: 'batched_reduce_size' + }, + maxConcurrentShardRequests: { + type: 'number', + 'default': 'The default grows with the number of nodes in the cluster but is at most 256.', + name: 'max_concurrent_shard_requests' + }, + preFilterShardSize: { + type: 'number', + 'default': 128, + name: 'pre_filter_shard_size' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchShards](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.routing - Specific routing value + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-template.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.searchType - Search operation type + * @param {<>} params.explain - Specify whether to return detailed information about score computation as part of a hit + * @param {<>} params.profile - Specify whether to profile the query execution + * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.searchTemplate = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + preference: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'time' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch' + ], + name: 'search_type' + }, + explain: { + type: 'boolean' + }, + profile: { + type: 'boolean' + }, + typedKeys: { + type: 'boolean', + name: 'typed_keys' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search/template', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search/template', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search/template' + } + ], + needBody: true, + method: 'POST' +}); + +api.snapshot = namespace(); + +/** + * Perform a [snapshot.create](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {<>} params.repository - A repository name + * @param {<>} params.snapshot - A snapshot name + */ +api.snapshot.prototype.create = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.createRepository](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.verify - Whether to verify the repository after creation + * @param {<>} params.repository - A repository name + */ +api.snapshot.prototype.createRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + verify: { + type: 'boolean' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'string' + } + } + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [snapshot.delete](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.repository - A repository name + * @param {<>} params.snapshot - A snapshot name + */ +api.snapshot.prototype['delete'] = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.deleteRepository](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.deleteRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.get](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + * @param {<>} params.verbose - Whether to show verbose snapshot info or only show the basic info found in the repository index blob + * @param {<>} params.repository - A repository name + * @param {<>, <>, <>} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.get = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + verbose: { + type: 'boolean' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + } +}); + +/** + * Perform a [snapshot.getRepository](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.getRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot' + } + ] +}); + +/** + * Perform a [snapshot.restore](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {<>} params.repository - A repository name + * @param {<>} params.snapshot - A snapshot name + */ +api.snapshot.prototype.restore = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.status](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + * @param {<>} params.repository - A repository name + * @param {<>, <>, <>} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.status = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot/<%=repository%>/_status', + req: { + repository: { + type: 'string' + } + } + }, + { + fmt: '/_snapshot/_status' + } + ] +}); + +/** + * Perform a [snapshot.verifyRepository](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.repository - A repository name + */ +api.snapshot.prototype.verifyRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/_verify', + req: { + repository: { + type: 'string' + } + } + }, + method: 'POST' +}); + +api.tasks = namespace(); + +/** + * Perform a [tasks.cancel](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.nodes - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {<>, <>, <>} params.actions - A comma-separated list of actions that should be cancelled. Leave empty to cancel all. + * @param {<>} params.parentTaskId - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. + * @param {<>} params.taskId - Cancel the task with specified task id (node_id:task_number) + */ +api.tasks.prototype.cancel = ca({ + params: { + nodes: { + type: 'list' + }, + actions: { + type: 'list' + }, + parentTaskId: { + type: 'string', + name: 'parent_task_id' + } + }, + urls: [ + { + fmt: '/_tasks/<%=taskId%>/_cancel', + req: { + taskId: { + type: 'string' + } + } + }, + { + fmt: '/_tasks/_cancel' + } + ], + method: 'POST' +}); + +/** + * Perform a [tasks.get](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForCompletion - Wait for the matching tasks to complete (default: false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.taskId - Return the task with specified id (node_id:task_number) + */ +api.tasks.prototype.get = ca({ + params: { + waitForCompletion: { + type: 'boolean', + name: 'wait_for_completion' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_tasks/<%=taskId%>', + req: { + taskId: { + type: 'string' + } + } + } +}); + +/** + * Perform a [tasks.list](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.nodes - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {<>, <>, <>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all. + * @param {<>} params.detailed - Return detailed task information (default: false) + * @param {<>} params.parentTaskId - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. + * @param {<>} params.waitForCompletion - Wait for the matching tasks to complete (default: false) + * @param {<>} [params.groupBy=nodes] - Group tasks by nodes or parent/child relationships + * @param {<>} params.timeout - Explicit operation timeout + */ +api.tasks.prototype.list = ca({ + params: { + nodes: { + type: 'list' + }, + actions: { + type: 'list' + }, + detailed: { + type: 'boolean' + }, + parentTaskId: { + type: 'string', + name: 'parent_task_id' + }, + waitForCompletion: { + type: 'boolean', + name: 'wait_for_completion' + }, + groupBy: { + type: 'enum', + 'default': 'nodes', + options: [ + 'nodes', + 'parents', + 'none' + ], + name: 'group_by' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_tasks' + } +}); + +/** + * Perform a [termvectors](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. + * @param {<>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. + * @param {<>, <>, <>} params.fields - A comma-separated list of fields to return. + * @param {<>} [params.offsets=true] - Specifies if term offsets should be returned. + * @param {<>} [params.positions=true] - Specifies if term positions should be returned. + * @param {<>} [params.payloads=true] - Specifies if term payloads should be returned. + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random). + * @param {<>} params.routing - Specific routing value. + * @param {<>} params.parent - Parent id of documents. + * @param {<>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true). + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.index - The index in which the document resides. + * @param {<>} params.type - The type of the document. + * @param {<>} params.id - The id of the document, when not specified a doc param should be supplied. + */ +api.termvectors = ca({ + params: { + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + }, + realtime: { + type: 'boolean', + required: false + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_termvectors', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [update](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-update.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update 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 {<>, <>, <>} params.fields - A comma-separated list of fields to return in the response + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.lang - The script language (default: painless) + * @param {<>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request + * @param {<>} params.refresh - If `true` then refresh the effected 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 {<>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0) + * @param {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - Document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.update = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + fields: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + lang: { + type: 'string' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + retryOnConflict: { + type: 'number', + name: 'retry_on_conflict' + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_update', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [updateByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-update-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.from - Starting offset (default: 0) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.conflicts=abort] - What to do when the update by query hits version conflicts? + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.pipeline - Ingest pipeline to set on index requests made by this action. (default: none) + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.searchType - Search operation type + * @param {<>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout. + * @param {<>} params.size - Number of hits to return (default: 10) + * @param {<>, <>, <>} params.sort - A comma-separated list of : pairs + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * @param {<>, <>, <>} params.stats - Specific 'tag' of the request for logging and statistical purposes + * @param {<>} params.version - Specify whether to return document version as part of a hit + * @param {<>} params.versionType - Should the document increment the version number (internal) on hit or not (reindex) + * @param {<>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting + * @param {<>} params.refresh - Should the effected indexes be refreshed? + * @param {<>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update by query 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 {<>} params.scrollSize - Size on the scroll request powering the update by query + * @param {<>} [params.waitForCompletion=true] - Should the request should block until the update by query operation is complete. + * @param {<>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle. + * @param {<>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.updateByQuery = ca({ + params: { + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + from: { + type: 'number' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + conflicts: { + type: 'enum', + 'default': 'abort', + options: [ + 'abort', + 'proceed' + ] + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + lenient: { + type: 'boolean' + }, + pipeline: { + type: 'string' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'time' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'dfs_query_then_fetch' + ], + name: 'search_type' + }, + searchTimeout: { + type: 'time', + name: 'search_timeout' + }, + size: { + type: 'number' + }, + sort: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + }, + stats: { + type: 'list' + }, + version: { + type: 'boolean' + }, + versionType: { + type: 'boolean', + name: 'version_type' + }, + requestCache: { + type: 'boolean', + name: 'request_cache' + }, + refresh: { + type: 'boolean' + }, + timeout: { + type: 'time', + 'default': '1m' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + scrollSize: { + type: 'number', + name: 'scroll_size' + }, + waitForCompletion: { + type: 'boolean', + 'default': true, + name: 'wait_for_completion' + }, + requestsPerSecond: { + type: 'number', + 'default': 0, + name: 'requests_per_second' + }, + slices: { + type: 'number', + 'default': 1 + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_update_by_query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_update_by_query', + req: { + index: { + type: 'list' + } + } + } + ], + method: 'POST' +}); diff --git a/src/lib/apis/6_5.js b/src/lib/apis/6_5.js new file mode 100644 index 000000000..cff75a473 --- /dev/null +++ b/src/lib/apis/6_5.js @@ -0,0 +1,7159 @@ +var ca = require('../client_action').makeFactoryWithModifier(function (spec) { + return require('lodash').merge(spec, { + params: { + filterPath: { + type: 'list', + name: 'filter_path' + } + } + }); +}); +var namespace = require('../client_action').namespaceFactory; +var api = module.exports = {}; + +api._namespaces = ['cat', 'cluster', 'indices', 'ingest', 'nodes', 'snapshot', 'tasks']; + +/** + * Perform a [bulk](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-bulk.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the bulk 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 {<>} params.refresh - If `true` then refresh the effected 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 {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.type - Default document type for items which don't provide one + * @param {<>, <>, <>} params.fields - Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request + * @param {<>, <>, <>} params._sourceExclude - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request + * @param {<>, <>, <>} params._sourceInclude - Default list of fields to extract and return from the _source field, can be overridden on each sub-request + * @param {<>} params.pipeline - The pipeline id to preprocess incoming documents with + * @param {<>} params.index - Default index for items which don't provide one + */ +api.bulk = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + type: { + type: 'string' + }, + fields: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + pipeline: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_bulk', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_bulk', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_bulk' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +api.cat = namespace(); + +/** + * Perform a [cat.aliases](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.name - A comma-separated list of alias names to return + */ +api.cat.prototype.aliases = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/aliases/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_cat/aliases' + } + ] +}); + +/** + * Perform a [cat.allocation](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-allocation.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information + */ +api.cat.prototype.allocation = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/allocation/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cat/allocation' + } + ] +}); + +/** + * Perform a [cat.count](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.count = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/count/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/count' + } + ] +}); + +/** + * Perform a [cat.fielddata](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-fielddata.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.fields - A comma-separated list of fields to return the fielddata size + */ +api.cat.prototype.fielddata = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + }, + fields: { + type: 'list' + } + }, + urls: [ + { + fmt: '/_cat/fielddata/<%=fields%>', + req: { + fields: { + type: 'list' + } + } + }, + { + fmt: '/_cat/fielddata' + } + ] +}); + +/** + * Perform a [cat.health](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} [params.ts=true] - Set to false to disable timestamping + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.health = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + ts: { + type: 'boolean', + 'default': true + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/health' + } +}); + +/** + * Perform a [cat.help](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + */ +api.cat.prototype.help = ca({ + params: { + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + } + }, + url: { + fmt: '/_cat' + } +}); + +/** + * Perform a [cat.indices](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-indices.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.health - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status + * @param {<>} params.help - Return help information + * @param {<>} params.pri - Set to true to return stats only for primary shards + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.indices = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'm', + 'g' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + health: { + type: 'enum', + 'default': null, + options: [ + 'green', + 'yellow', + 'red' + ] + }, + help: { + type: 'boolean', + 'default': false + }, + pri: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/indices/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/indices' + } + ] +}); + +/** + * Perform a [cat.master](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-master.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.master = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/master' + } +}); + +/** + * Perform a [cat.nodeattrs](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-nodeattrs.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.nodeattrs = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/nodeattrs' + } +}); + +/** + * Perform a [cat.nodes](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-nodes.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.fullId - Return the full node ID instead of the shortened version (default: false) + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.nodes = ca({ + params: { + format: { + type: 'string' + }, + fullId: { + type: 'boolean', + name: 'full_id' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/nodes' + } +}); + +/** + * Perform a [cat.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-pending-tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.pendingTasks = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/pending_tasks' + } +}); + +/** + * Perform a [cat.plugins](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-plugins.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.plugins = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/plugins' + } +}); + +/** + * Perform a [cat.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.recovery = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/recovery/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/recovery' + } + ] +}); + +/** + * Perform a [cat.repositories](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-repositories.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.repositories = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean', + 'default': false + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/repositories' + } +}); + +/** + * Perform a [cat.segments](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-segments.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.segments = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/segments/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/segments' + } + ] +}); + +/** + * Perform a [cat.shards](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.bytes - The unit in which to display byte values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.shards = ca({ + params: { + format: { + type: 'string' + }, + bytes: { + type: 'enum', + options: [ + 'b', + 'k', + 'kb', + 'm', + 'mb', + 'g', + 'gb', + 't', + 'tb', + 'p', + 'pb' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/shards/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/shards' + } + ] +}); + +/** + * Perform a [cat.snapshots](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.ignoreUnavailable - Set to true to ignore unavailable snapshots + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.repository - Name of repository from which to fetch the snapshot information + */ +api.cat.prototype.snapshots = ca({ + params: { + format: { + type: 'string' + }, + ignoreUnavailable: { + type: 'boolean', + 'default': false, + name: 'ignore_unavailable' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/snapshots/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + { + fmt: '/_cat/snapshots' + } + ] +}); + +/** + * Perform a [cat.tasks](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {<>, <>, <>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all. + * @param {<>} params.detailed - Return detailed task information (default: false) + * @param {<>} params.parentTask - Return tasks with specified parent task id. Set to -1 to return all. + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + */ +api.cat.prototype.tasks = ca({ + params: { + format: { + type: 'string' + }, + nodeId: { + type: 'list', + name: 'node_id' + }, + actions: { + type: 'list' + }, + detailed: { + type: 'boolean' + }, + parentTask: { + type: 'number', + name: 'parent_task' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + url: { + fmt: '/_cat/tasks' + } +}); + +/** + * Perform a [cat.templates](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>} params.name - A pattern that returned template names must match + */ +api.cat.prototype.templates = ca({ + params: { + format: { + type: 'string' + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/templates/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + { + fmt: '/_cat/templates' + } + ] +}); + +/** + * Perform a [cat.threadPool](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cat-thread-pool.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.format - a short version of the Accept header, e.g. json, yaml + * @param {<>} params.size - The multiplier in which to display values + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>, <>, <>} params.h - Comma-separated list of column names to display + * @param {<>} params.help - Return help information + * @param {<>, <>, <>} params.s - Comma-separated list of column names or column aliases to sort by + * @param {<>} params.v - Verbose mode. Display column headers + * @param {<>, <>, <>} params.threadPoolPatterns - A comma-separated list of regular-expressions to filter the thread pools in the output + */ +api.cat.prototype.threadPool = ca({ + params: { + format: { + type: 'string' + }, + size: { + type: 'enum', + options: [ + '', + 'k', + 'm', + 'g', + 't', + 'p' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + s: { + type: 'list' + }, + v: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_cat/thread_pool/<%=threadPoolPatterns%>', + req: { + threadPoolPatterns: { + type: 'list' + } + } + }, + { + fmt: '/_cat/thread_pool' + } + ] +}); + +/** + * Perform a [clearScroll](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.scrollId - A comma-separated list of scroll IDs to clear + */ +api.clearScroll = ca({ + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'list' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + paramAsBody: { + param: 'scrollId', + body: 'scroll_id' + }, + method: 'DELETE' +}); + +api.cluster = namespace(); + +/** + * Perform a [cluster.allocationExplain](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-allocation-explain.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.includeYesDecisions - Return 'YES' decisions in explanation (default: false) + * @param {<>} params.includeDiskInfo - Return information about disk usage and shard sizes (default: false) + */ +api.cluster.prototype.allocationExplain = ca({ + params: { + includeYesDecisions: { + type: 'boolean', + name: 'include_yes_decisions' + }, + includeDiskInfo: { + type: 'boolean', + name: 'include_disk_info' + } + }, + url: { + fmt: '/_cluster/allocation/explain' + }, + method: 'POST' +}); + +/** + * Perform a [cluster.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.includeDefaults - Whether to return all default clusters setting. + */ +api.cluster.prototype.getSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + includeDefaults: { + type: 'boolean', + 'default': false, + name: 'include_defaults' + } + }, + url: { + fmt: '/_cluster/settings' + } +}); + +/** + * Perform a [cluster.health](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-health.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} [params.level=cluster] - Specify the level of detail for returned information + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.waitForActiveShards - Wait until the specified number of shards is active + * @param {<>} params.waitForNodes - Wait until the specified number of nodes is available + * @param {<>} params.waitForEvents - Wait until all currently queued events with the given priority are processed + * @param {<>} params.waitForNoRelocatingShards - Whether to wait until there are no relocating shards in the cluster + * @param {<>} params.waitForNoInitializingShards - Whether to wait until there are no initializing shards in the cluster + * @param {<>} params.waitForStatus - Wait until cluster is in a specific state + * @param {<>, <>, <>} params.index - Limit the information returned to a specific index + */ +api.cluster.prototype.health = ca({ + params: { + level: { + type: 'enum', + 'default': 'cluster', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + waitForNodes: { + type: 'string', + name: 'wait_for_nodes' + }, + waitForEvents: { + type: 'enum', + options: [ + 'immediate', + 'urgent', + 'high', + 'normal', + 'low', + 'languid' + ], + name: 'wait_for_events' + }, + waitForNoRelocatingShards: { + type: 'boolean', + name: 'wait_for_no_relocating_shards' + }, + waitForNoInitializingShards: { + type: 'boolean', + name: 'wait_for_no_initializing_shards' + }, + waitForStatus: { + type: 'enum', + 'default': null, + options: [ + 'green', + 'yellow', + 'red' + ], + name: 'wait_for_status' + } + }, + urls: [ + { + fmt: '/_cluster/health/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/health' + } + ] +}); + +/** + * Perform a [cluster.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-pending.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Specify timeout for connection to master + */ +api.cluster.prototype.pendingTasks = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_cluster/pending_tasks' + } +}); + +/** + * Perform a [cluster.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.putSettings = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/settings' + }, + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [cluster.remoteInfo](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-remote-info.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.cluster.prototype.remoteInfo = ca({ + url: { + fmt: '/_remote/info' + } +}); + +/** + * Perform a [cluster.reroute](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-reroute.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.dryRun - Simulate the operation only and return the resulting state + * @param {<>} params.explain - Return an explanation of why the commands can or cannot be executed + * @param {<>} params.retryFailed - Retries allocation of shards that are blocked due to too many subsequent allocation failures + * @param {<>, <>, <>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + */ +api.cluster.prototype.reroute = ca({ + params: { + dryRun: { + type: 'boolean', + name: 'dry_run' + }, + explain: { + type: 'boolean' + }, + retryFailed: { + type: 'boolean', + name: 'retry_failed' + }, + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'master_node', + 'version' + ] + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_cluster/reroute' + }, + method: 'POST' +}); + +/** + * Perform a [cluster.state](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-state.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.metric - Limit the information returned to the specified metrics + */ +api.cluster.prototype.state = ca({ + params: { + local: { + type: 'boolean' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/_cluster/state/<%=metric%>/<%=index%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'routing_nodes', + 'master_node', + 'version' + ] + }, + index: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/state/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'blocks', + 'metadata', + 'nodes', + 'routing_table', + 'routing_nodes', + 'master_node', + 'version' + ] + } + } + }, + { + fmt: '/_cluster/state' + } + ] +}); + +/** + * Perform a [cluster.stats](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.cluster.prototype.stats = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_cluster/stats/nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_cluster/stats' + } + ] +}); + +/** + * Perform a [count](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-count.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.minScore - Include only documents with a specific `_score` value in the result + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.terminateAfter - The maximum count for each shard, upon reaching which the query execution will terminate early + * @param {<>, <>, <>} params.index - A comma-separated list of indices to restrict the results + * @param {<>, <>, <>} params.type - A comma-separated list of types to restrict the results + */ +api.count = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + minScore: { + type: 'number', + name: 'min_score' + }, + preference: { + type: 'string' + }, + routing: { + type: 'list' + }, + q: { + type: 'string' + }, + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + lenient: { + type: 'boolean' + }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_count', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_count', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_count' + } + ], + method: 'POST' +}); + +/** + * Perform a [create](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} 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 {<>} params.parent - ID of the parent document + * @param {<>} 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 {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.pipeline - The pipeline id to preprocess incoming documents with + * @param {<>} params.id - Document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.create = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + }, + pipeline: { + type: 'string' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_create', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [delete](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete 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 {<>} params.parent - ID of parent document + * @param {<>} params.refresh - If `true` then refresh the effected 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 {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api['delete'] = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [deleteByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.from - Starting offset (default: 0) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.conflicts=abort] - What to do when the delete by query hits version conflicts? + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.searchType - Search operation type + * @param {<>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout. + * @param {<>} params.size - Number of hits to return (default: 10) + * @param {<>, <>, <>} params.sort - A comma-separated list of : pairs + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * @param {<>, <>, <>} params.stats - Specific 'tag' of the request for logging and statistical purposes + * @param {<>} params.version - Specify whether to return document version as part of a hit + * @param {<>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting + * @param {<>} params.refresh - Should the effected indexes be refreshed? + * @param {<>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete by query 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 {<>} params.scrollSize - Size on the scroll request powering the delete by query + * @param {<>} [params.waitForCompletion=true] - Should the request should block until the delete by query is complete. + * @param {<>} params.requestsPerSecond - The throttle for this request in sub-requests per second. -1 means no throttle. + * @param {<>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.deleteByQuery = ca({ + params: { + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + from: { + type: 'number' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + conflicts: { + type: 'enum', + 'default': 'abort', + options: [ + 'abort', + 'proceed' + ] + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + lenient: { + type: 'boolean' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'time' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'dfs_query_then_fetch' + ], + name: 'search_type' + }, + searchTimeout: { + type: 'time', + name: 'search_timeout' + }, + size: { + type: 'number' + }, + sort: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + }, + stats: { + type: 'list' + }, + version: { + type: 'boolean' + }, + requestCache: { + type: 'boolean', + name: 'request_cache' + }, + refresh: { + type: 'boolean' + }, + timeout: { + type: 'time', + 'default': '1m' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + scrollSize: { + type: 'number', + name: 'scroll_size' + }, + waitForCompletion: { + type: 'boolean', + 'default': true, + name: 'wait_for_completion' + }, + requestsPerSecond: { + type: 'number', + 'default': 0, + name: 'requests_per_second' + }, + slices: { + type: 'number', + 'default': 1 + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_delete_by_query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_delete_by_query', + req: { + index: { + type: 'list' + } + } + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [deleteByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.deleteByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_delete_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [deleteScript](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-scripting.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.id - Script ID + */ +api.deleteScript = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_scripts/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [exists](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return in the response + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.exists = ca({ + params: { + storedFields: { + type: 'list', + name: 'stored_fields' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [existsSource](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types + */ +api.existsSource = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_source', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [explain](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-explain.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) + * @param {<>} params.analyzer - The analyzer for the query string query + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The default field for query string query (default: _all) + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return in the response + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.explain = ca({ + params: { + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + analyzer: { + type: 'string' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + storedFields: { + type: 'list', + name: 'stored_fields' + }, + lenient: { + type: 'boolean' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [fieldCaps](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-field-caps.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.fields - A comma-separated list of field names + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.fieldCaps = ca({ + params: { + fields: { + type: 'list' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_field_caps', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_field_caps' + } + ], + method: 'POST' +}); + +/** + * Perform a [get](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return in the response + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types) + */ +api.get = ca({ + params: { + storedFields: { + type: 'list', + name: 'stored_fields' + }, + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [getScript](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-scripting.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.id - Script ID + */ +api.getScript = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_scripts/<%=id%>', + req: { + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [getSource](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.parent - The ID of the parent document + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - The document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types + */ +api.getSource = ca({ + params: { + parent: { + type: 'string' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_source', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + } +}); + +/** + * Perform a [index](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-index_.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} 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 {<>} [params.opType=index] - Explicit operation type + * @param {<>} params.parent - ID of the parent document + * @param {<>} 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 {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.pipeline - The pipeline id to preprocess incoming documents with + * @param {<>} params.id - Document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.index = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + opType: { + type: 'enum', + 'default': 'index', + options: [ + 'index', + 'create' + ], + name: 'op_type' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + }, + pipeline: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'POST' +}); + +api.indices = namespace(); + +/** + * Perform a [indices.analyze](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-analyze.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.index - The name of the index to scope the operation + */ +api.indices.prototype.analyze = ca({ + params: { + index: { + type: 'string' + } + }, + urls: [ + { + fmt: '/<%=index%>/_analyze', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_analyze' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.clearCache](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-clearcache.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.fieldData - Clear field data. This is deprecated. Prefer `fielddata`. + * @param {<>} params.fielddata - Clear field data + * @param {<>, <>, <>} params.fields - A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) + * @param {<>} params.query - Clear query caches + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index name to limit the operation + * @param {<>} params.requestCache - Clear request cache + * @param {<>} params.request - Clear request cache + */ +api.indices.prototype.clearCache = ca({ + params: { + fieldData: { + type: 'boolean', + name: 'field_data' + }, + fielddata: { + type: 'boolean' + }, + fields: { + type: 'list' + }, + query: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + index: { + type: 'list' + }, + requestCache: { + type: 'boolean', + name: 'request_cache' + }, + request: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_cache/clear', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cache/clear' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.close](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma separated list of indices to close + */ +api.indices.prototype.close = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>/_close', + req: { + index: { + type: 'list' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.create](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-create-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForActiveShards - Set the number of active shards to wait for before the operation returns. + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not + * @param {<>} params.index - The name of the index + */ +api.indices.prototype.create = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + updateAllTypes: { + type: 'boolean', + name: 'update_all_types' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'string' + } + } + }, + method: 'PUT' +}); + +/** + * Perform a [indices.delete](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-delete-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Ignore unavailable indexes (default: false) + * @param {<>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false) + * @param {<>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open) + * @param {<>, <>, <>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices + */ +api.indices.prototype['delete'] = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteAlias](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit timestamp for the document + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>, <>, <>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices + * @param {<>, <>, <>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. + */ +api.indices.prototype.deleteAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.deleteTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.name - The name of the template + */ +api.indices.prototype.deleteTemplate = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [indices.exists](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-exists.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.ignoreUnavailable - Ignore unavailable indexes (default: false) + * @param {<>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false) + * @param {<>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open) + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.includeDefaults - Whether to return all default setting for each of the indices. + * @param {<>, <>, <>} params.index - A comma-separated list of index names + */ +api.indices.prototype.exists = ca({ + params: { + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + includeDefaults: { + type: 'boolean', + 'default': false, + name: 'include_defaults' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsAlias](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=all] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names to filter aliases + * @param {<>, <>, <>} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.existsAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'all', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + } + ], + method: 'HEAD' +}); + +/** + * Perform a [indices.existsTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.name - The comma separated names of the index templates + */ +api.indices.prototype.existsTemplate = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.existsType](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-types-exists.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to check + */ +api.indices.prototype.existsType = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + url: { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + method: 'HEAD' +}); + +/** + * Perform a [indices.flush](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-flush.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) + * @param {<>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.flush = ca({ + params: { + force: { + type: 'boolean' + }, + waitIfOngoing: { + type: 'boolean', + name: 'wait_if_ongoing' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_flush', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_flush' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.flushSynced](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-synced-flush.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + */ +api.indices.prototype.flushSynced = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_flush/synced', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_flush/synced' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.forcemerge](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-forcemerge.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flush - Specify whether the index should be flushed after performing the operation (default: true) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic) + * @param {<>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.forcemerge = ca({ + params: { + flush: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + maxNumSegments: { + type: 'number', + name: 'max_num_segments' + }, + onlyExpungeDeletes: { + type: 'boolean', + name: 'only_expunge_deletes' + } + }, + urls: [ + { + fmt: '/<%=index%>/_forcemerge', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_forcemerge' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.get](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-get-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.ignoreUnavailable - Ignore unavailable indexes (default: false) + * @param {<>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false) + * @param {<>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open) + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.includeDefaults - Whether to return all default setting for each of the indices. + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>, <>, <>} params.index - A comma-separated list of index names + */ +api.indices.prototype.get = ca({ + params: { + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + includeDefaults: { + type: 'boolean', + 'default': false, + name: 'include_defaults' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>', + req: { + index: { + type: 'list' + } + } + } +}); + +/** + * Perform a [indices.getAlias](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=all] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names to filter aliases + * @param {<>, <>, <>} params.name - A comma-separated list of alias names to return + */ +api.indices.prototype.getAlias = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'all', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/_alias/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_alias', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_alias' + } + ] +}); + +/** + * Perform a [indices.getFieldMapping](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-get-field-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.includeDefaults - Whether the default mapping values should be returned as well + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names + * @param {<>, <>, <>} params.type - A comma-separated list of document types + * @param {<>, <>, <>} params.fields - A comma-separated list of fields + */ +api.indices.prototype.getFieldMapping = ca({ + params: { + includeDefaults: { + type: 'boolean', + name: 'include_defaults' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + }, + fields: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping/field/<%=fields%>', + req: { + index: { + type: 'list' + }, + fields: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>/field/<%=fields%>', + req: { + type: { + type: 'list' + }, + fields: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/field/<%=fields%>', + req: { + fields: { + type: 'list' + } + } + } + ] +}); + +/** + * Perform a [indices.getMapping](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-get-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names + * @param {<>, <>, <>} params.type - A comma-separated list of document types + */ +api.indices.prototype.getMapping = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_mapping', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'list' + } + } + }, + { + fmt: '/_mapping' + } + ] +}); + +/** + * Perform a [indices.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-get-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.includeDefaults - Whether to return all default setting for each of the indices. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.name - The name of the settings that should be included + */ +api.indices.prototype.getSettings = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': [ + 'open', + 'closed' + ], + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + local: { + type: 'boolean' + }, + includeDefaults: { + type: 'boolean', + 'default': false, + name: 'include_defaults' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ] +}); + +/** + * Perform a [indices.getTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.name - The comma separated names of the index templates + */ +api.indices.prototype.getTemplate = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'list' + } + } + }, + { + fmt: '/_template' + } + ] +}); + +/** + * Perform a [indices.getUpgrade](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-upgrade.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.getUpgrade = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_upgrade', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_upgrade' + } + ] +}); + +/** + * Perform a [indices.open](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-open-close.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.waitForActiveShards - Sets the number of active shards to wait for before the operation returns. + * @param {<>, <>, <>} params.index - A comma separated list of indices to open + */ +api.indices.prototype.open = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'closed', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + } + }, + url: { + fmt: '/<%=index%>/_open', + req: { + index: { + type: 'list' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.putAlias](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit timestamp for the document + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>, <>, <>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. + * @param {<>} params.name - The name of the alias to be created or updated + */ +api.indices.prototype.putAlias = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'string' + } + } + }, + method: 'PUT' +}); + +/** + * Perform a [indices.putMapping](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-put-mapping.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not + * @param {<>, <>, <>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. + * @param {<>} params.type - The name of the document type + */ +api.indices.prototype.putMapping = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + updateAllTypes: { + type: 'boolean', + name: 'update_all_types' + } + }, + urls: [ + { + fmt: '/<%=index%>/_mapping/<%=type%>', + req: { + index: { + type: 'list' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/_mapping/<%=type%>', + req: { + type: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-update-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.preserveExisting - Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.putSettings = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + preserveExisting: { + type: 'boolean', + name: 'preserve_existing' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + urls: [ + { + fmt: '/<%=index%>/_settings', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_settings' + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.putTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-templates.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) + * @param {<>} params.create - Whether the index template should only be added if new or can also replace an existing one + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.name - The name of the template + */ +api.indices.prototype.putTemplate = ca({ + params: { + order: { + type: 'number' + }, + create: { + type: 'boolean', + 'default': false + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + flatSettings: { + type: 'boolean', + name: 'flat_settings' + } + }, + url: { + fmt: '/_template/<%=name%>', + req: { + name: { + type: 'string' + } + } + }, + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [indices.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-recovery.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.detailed - Whether to display detailed information about shard recovery + * @param {<>} params.activeOnly - Display only those recoveries that are currently on-going + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.recovery = ca({ + params: { + detailed: { + type: 'boolean', + 'default': false + }, + activeOnly: { + type: 'boolean', + 'default': false, + name: 'active_only' + } + }, + urls: [ + { + fmt: '/<%=index%>/_recovery', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_recovery' + } + ] +}); + +/** + * Perform a [indices.refresh](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-refresh.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.refresh = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_refresh', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_refresh' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.rollover](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-rollover-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.dryRun - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.waitForActiveShards - Set the number of active shards to wait for on the newly created rollover index before the operation returns. + * @param {<>} params.alias - The name of the alias to rollover + * @param {<>} params.newIndex - The name of the rollover index + */ +api.indices.prototype.rollover = ca({ + params: { + timeout: { + type: 'time' + }, + dryRun: { + type: 'boolean', + name: 'dry_run' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + } + }, + urls: [ + { + fmt: '/<%=alias%>/_rollover/<%=newIndex%>', + req: { + alias: { + type: 'string' + }, + newIndex: { + type: 'string' + } + } + }, + { + fmt: '/<%=alias%>/_rollover', + req: { + alias: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.segments](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-segments.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.verbose - Includes detailed memory usage by Lucene. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.segments = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + verbose: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/<%=index%>/_segments', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_segments' + } + ] +}); + +/** + * Perform a [indices.shardStores](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-shards-stores.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.status - A comma-separated list of statuses used to filter on shards to get store information for + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.shardStores = ca({ + params: { + status: { + type: 'list', + options: [ + 'green', + 'yellow', + 'red', + 'all' + ] + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_shard_stores', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_shard_stores' + } + ] +}); + +/** + * Perform a [indices.shrink](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-shrink-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.copySettings - whether or not to copy settings from the source index (defaults to false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.waitForActiveShards - Set the number of active shards to wait for on the shrunken index before the operation returns. + * @param {<>} params.index - The name of the source index to shrink + * @param {<>} params.target - The name of the target index to shrink into + */ +api.indices.prototype.shrink = ca({ + params: { + copySettings: { + type: 'boolean', + name: 'copy_settings' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + } + }, + url: { + fmt: '/<%=index%>/_shrink/<%=target%>', + req: { + index: { + type: 'string' + }, + target: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.split](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-split-index.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.copySettings - whether or not to copy settings from the source index (defaults to false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.waitForActiveShards - Set the number of active shards to wait for on the shrunken index before the operation returns. + * @param {<>} params.index - The name of the source index to split + * @param {<>} params.target - The name of the target index to split into + */ +api.indices.prototype.split = ca({ + params: { + copySettings: { + type: 'boolean', + name: 'copy_settings' + }, + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + } + }, + url: { + fmt: '/<%=index%>/_split/<%=target%>', + req: { + index: { + type: 'string' + }, + target: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [indices.stats](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {<>, <>, <>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {<>, <>, <>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {<>, <>, <>} params.groups - A comma-separated list of search groups for `search` index metric + * @param {<>} [params.level=indices] - Return stats aggregated at cluster, index or shard level + * @param {<>, <>, <>} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {<>} params.includeSegmentFileSizes - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.metric - Limit the information returned the specific metrics. + */ +api.indices.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'list' + }, + level: { + type: 'enum', + 'default': 'indices', + options: [ + 'cluster', + 'indices', + 'shards' + ] + }, + types: { + type: 'list' + }, + includeSegmentFileSizes: { + type: 'boolean', + 'default': false, + name: 'include_segment_file_sizes' + } + }, + urls: [ + { + fmt: '/<%=index%>/_stats/<%=metric%>', + req: { + index: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'query_cache', + 'flush', + 'get', + 'indexing', + 'merge', + 'request_cache', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer', + 'suggest' + ] + } + } + }, + { + fmt: '/_stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'query_cache', + 'flush', + 'get', + 'indexing', + 'merge', + 'request_cache', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer', + 'suggest' + ] + } + } + }, + { + fmt: '/<%=index%>/_stats', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_stats' + } + ] +}); + +/** + * Perform a [indices.updateAliases](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-aliases.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Request timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + */ +api.indices.prototype.updateAliases = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_aliases' + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [indices.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-upgrade.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false) + * @param {<>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded + * @param {<>, <>, <>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + */ +api.indices.prototype.upgrade = ca({ + params: { + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + waitForCompletion: { + type: 'boolean', + name: 'wait_for_completion' + }, + onlyAncientSegments: { + type: 'boolean', + name: 'only_ancient_segments' + } + }, + urls: [ + { + fmt: '/<%=index%>/_upgrade', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_upgrade' + } + ], + method: 'POST' +}); + +/** + * Perform a [indices.validateQuery](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-validate.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.explain - Return detailed information about the error + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed. + * @param {<>} params.allShards - Execute validation on all shards instead of one random shard per index + * @param {<>, <>, <>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types + */ +api.indices.prototype.validateQuery = ca({ + params: { + explain: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + q: { + type: 'string' + }, + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + lenient: { + type: 'boolean' + }, + rewrite: { + type: 'boolean' + }, + allShards: { + type: 'boolean', + name: 'all_shards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_validate/query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_validate/query', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_validate/query' + } + ], + method: 'POST' +}); + +/** + * Perform a [info](http://www.elastic.co/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.info = ca({ + url: { + fmt: '/' + } +}); + +api.ingest = namespace(); + +/** + * Perform a [ingest.deletePipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.id - Pipeline ID + */ +api.ingest.prototype.deletePipeline = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_ingest/pipeline/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [ingest.getPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.id - Comma separated list of pipeline ids. Wildcards supported + */ +api.ingest.prototype.getPipeline = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + urls: [ + { + fmt: '/_ingest/pipeline/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + { + fmt: '/_ingest/pipeline' + } + ] +}); + +/** + * Perform a [ingest.processorGrok](https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.ingest.prototype.processorGrok = ca({ + url: { + fmt: '/_ingest/processor/grok' + } +}); + +/** + * Perform a [ingest.putPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.id - Pipeline ID + */ +api.ingest.prototype.putPipeline = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_ingest/pipeline/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [ingest.simulate](https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/ingest.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.verbose - Verbose mode. Display data output for each processor in executed pipeline + * @param {<>} params.id - Pipeline ID + */ +api.ingest.prototype.simulate = ca({ + params: { + verbose: { + type: 'boolean', + 'default': false + } + }, + urls: [ + { + fmt: '/_ingest/pipeline/<%=id%>/_simulate', + req: { + id: { + type: 'string' + } + } + }, + { + fmt: '/_ingest/pipeline/_simulate' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [mget](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-multi-get.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return in the response + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.realtime - Specify whether to perform the operation in realtime or search mode + * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation + * @param {<>} params.routing - Specific routing value + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.mget = ca({ + params: { + storedFields: { + type: 'list', + name: 'stored_fields' + }, + preference: { + type: 'string' + }, + realtime: { + type: 'boolean' + }, + refresh: { + type: 'boolean' + }, + routing: { + type: 'string' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mget', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mget', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mget' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [msearch](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-multi-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.searchType - Search operation type + * @param {<>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute + * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * @param {<>} [params.preFilterShardSize=128] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {<>} [params.maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.] - The number of concurrent shard requests each sub search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + * @param {<>, <>, <>} params.index - A comma-separated list of index names to use as default + * @param {<>, <>, <>} params.type - A comma-separated list of document types to use as default + */ +api.msearch = ca({ + params: { + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch' + ], + name: 'search_type' + }, + maxConcurrentSearches: { + type: 'number', + name: 'max_concurrent_searches' + }, + typedKeys: { + type: 'boolean', + name: 'typed_keys' + }, + preFilterShardSize: { + type: 'number', + 'default': 128, + name: 'pre_filter_shard_size' + }, + maxConcurrentShardRequests: { + type: 'number', + 'default': 'The default grows with the number of nodes in the cluster but is at most 256.', + name: 'max_concurrent_shard_requests' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_msearch', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_msearch', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_msearch' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [msearchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-multi-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.searchType - Search operation type + * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * @param {<>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute + * @param {<>, <>, <>} params.index - A comma-separated list of index names to use as default + * @param {<>, <>, <>} params.type - A comma-separated list of document types to use as default + */ +api.msearchTemplate = ca({ + params: { + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch' + ], + name: 'search_type' + }, + typedKeys: { + type: 'boolean', + name: 'typed_keys' + }, + maxConcurrentSearches: { + type: 'number', + name: 'max_concurrent_searches' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_msearch/template', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_msearch/template', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_msearch/template' + } + ], + needBody: true, + bulkBody: true, + method: 'POST' +}); + +/** + * Perform a [mtermvectors](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-multi-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + * @param {<>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>, <>, <>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * @param {<>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true). + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.index - The index in which the document resides. + * @param {<>} params.type - The type of the document. + */ +api.mtermvectors = ca({ + params: { + ids: { + type: 'list', + required: false + }, + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + }, + realtime: { + type: 'boolean', + required: false + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_mtermvectors', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_mtermvectors', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_mtermvectors' + } + ], + method: 'POST' +}); + +api.nodes = namespace(); + +/** + * Perform a [nodes.hotThreads](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-nodes-hot-threads.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.interval - The interval for the second sampling of threads + * @param {<>} params.snapshots - Number of samples of thread stacktrace (default: 10) + * @param {<>} params.threads - Specify the number of threads to provide information for (default: 3) + * @param {<>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) + * @param {<>} params.type - The type to sample (default: cpu) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.hotThreads = ca({ + params: { + interval: { + type: 'time' + }, + snapshots: { + type: 'number' + }, + threads: { + type: 'number' + }, + ignoreIdleThreads: { + type: 'boolean', + name: 'ignore_idle_threads' + }, + type: { + type: 'enum', + options: [ + 'cpu', + 'wait', + 'block' + ] + }, + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/hotthreads', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/hotthreads' + } + ] +}); + +/** + * Perform a [nodes.info](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-nodes-info.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.flatSettings - Return settings in flat format (default: false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {<>, <>, <>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all. + */ +api.nodes.prototype.info = ca({ + params: { + flatSettings: { + type: 'boolean', + name: 'flat_settings' + }, + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'transport', + 'http', + 'plugins', + 'ingest' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + 'settings', + 'os', + 'process', + 'jvm', + 'thread_pool', + 'transport', + 'http', + 'plugins', + 'ingest' + ] + } + } + }, + { + fmt: '/_nodes' + } + ] +}); + +/** + * Perform a [nodes.reloadSecureSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/secure-settings.html#reloadable-secure-settings) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. + */ +api.nodes.prototype.reloadSecureSettings = ca({ + params: { + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/reload_secure_settings', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/reload_secure_settings' + } + ], + method: 'POST' +}); + +/** + * Perform a [nodes.stats](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-nodes-stats.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * @param {<>, <>, <>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * @param {<>, <>, <>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * @param {<>} params.groups - A comma-separated list of search groups for `search` index metric + * @param {<>} [params.level=node] - Return indices stats aggregated at index, node or shard level + * @param {<>, <>, <>} params.types - A comma-separated list of document types for the `indexing` index metric + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.includeSegmentFileSizes - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) + * @param {<>, <>, <>} params.metric - Limit the information returned to the specified metrics + * @param {<>, <>, <>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.stats = ca({ + params: { + completionFields: { + type: 'list', + name: 'completion_fields' + }, + fielddataFields: { + type: 'list', + name: 'fielddata_fields' + }, + fields: { + type: 'list' + }, + groups: { + type: 'boolean' + }, + level: { + type: 'enum', + 'default': 'node', + options: [ + 'indices', + 'node', + 'shards' + ] + }, + types: { + type: 'list' + }, + timeout: { + type: 'time' + }, + includeSegmentFileSizes: { + type: 'boolean', + 'default': false, + name: 'include_segment_file_sizes' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'os', + 'process', + 'thread_pool', + 'transport', + 'discovery' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'query_cache', + 'flush', + 'get', + 'indexing', + 'merge', + 'request_cache', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer', + 'suggest' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'os', + 'process', + 'thread_pool', + 'transport', + 'discovery' + ] + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'os', + 'process', + 'thread_pool', + 'transport', + 'discovery' + ] + }, + indexMetric: { + type: 'list', + options: [ + '_all', + 'completion', + 'docs', + 'fielddata', + 'query_cache', + 'flush', + 'get', + 'indexing', + 'merge', + 'request_cache', + 'refresh', + 'search', + 'segments', + 'store', + 'warmer', + 'suggest' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/stats', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/stats/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'breaker', + 'fs', + 'http', + 'indices', + 'jvm', + 'os', + 'process', + 'thread_pool', + 'transport', + 'discovery' + ] + } + } + }, + { + fmt: '/_nodes/stats' + } + ] +}); + +/** + * Perform a [nodes.usage](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/cluster-nodes-usage.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.metric - Limit the information returned to the specified metrics + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + */ +api.nodes.prototype.usage = ca({ + params: { + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/usage/<%=metric%>', + req: { + nodeId: { + type: 'list' + }, + metric: { + type: 'list', + options: [ + '_all', + 'rest_actions' + ] + } + } + }, + { + fmt: '/_nodes/<%=nodeId%>/usage', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/usage/<%=metric%>', + req: { + metric: { + type: 'list', + options: [ + '_all', + 'rest_actions' + ] + } + } + }, + { + fmt: '/_nodes/usage' + } + ] +}); + +/** + * Perform a [ping](http://www.elastic.co/guide/) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.ping = ca({ + url: { + fmt: '/' + }, + method: 'HEAD' +}); + +/** + * Perform a [putScript](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-scripting.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.masterTimeout - Specify timeout for connection to master + * @param {<>} params.context - Script context + * @param {<>} params.id - Script ID + */ +api.putScript = ca({ + params: { + timeout: { + type: 'time' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + context: { + type: 'string' + } + }, + urls: [ + { + fmt: '/_scripts/<%=id%>/<%=context%>', + req: { + id: { + type: 'string' + }, + context: { + type: 'string' + } + } + }, + { + fmt: '/_scripts/<%=id%>', + req: { + id: { + type: 'string' + } + } + } + ], + needBody: true, + method: 'PUT' +}); + +/** + * Perform a [rankEval](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-rank-eval.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + */ +api.rankEval = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_rank_eval', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_rank_eval' + } + ], + needBody: true, + method: 'POST' +}); + +/** + * Perform a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-reindex.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.refresh - Should the effected indexes be refreshed? + * @param {<>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the reindex 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 {<>} [params.waitForCompletion=true] - Should the request should block until the reindex is complete. + * @param {<>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle. + * @param {<>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + */ +api.reindex = ca({ + params: { + refresh: { + type: 'boolean' + }, + timeout: { + type: 'time', + 'default': '1m' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + waitForCompletion: { + type: 'boolean', + 'default': true, + name: 'wait_for_completion' + }, + requestsPerSecond: { + type: 'number', + 'default': 0, + name: 'requests_per_second' + }, + slices: { + type: 'number', + 'default': 1 + } + }, + url: { + fmt: '/_reindex' + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [reindexRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-reindex.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.reindexRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_reindex/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [renderSearchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-template.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.id - The id of the stored search template + */ +api.renderSearchTemplate = ca({ + urls: [ + { + fmt: '/_render/template/<%=id%>', + req: { + id: { + type: 'string' + } + } + }, + { + fmt: '/_render/template' + } + ], + method: 'POST' +}); + +/** + * Perform a [scriptsPainlessExecute](https://www.elastic.co/guide/en/elasticsearch/painless/6.5/painless-execute-api.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + */ +api.scriptsPainlessExecute = ca({ + url: { + fmt: '/_scripts/painless/_execute' + }, + method: 'POST' +}); + +/** + * Perform a [scroll](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-request-scroll.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.scrollId - The scroll ID + */ +api.scroll = ca({ + params: { + scroll: { + type: 'time' + }, + scrollId: { + type: 'string', + name: 'scroll_id' + } + }, + urls: [ + { + fmt: '/_search/scroll/<%=scrollId%>', + req: { + scrollId: { + type: 'string' + } + } + }, + { + fmt: '/_search/scroll' + } + ], + paramAsBody: { + param: 'scrollId', + body: 'scroll_id' + }, + method: 'POST' +}); + +/** + * Perform a [search](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-search.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.explain - Specify whether to return detailed information about score computation as part of a hit + * @param {<>, <>, <>} params.storedFields - A comma-separated list of stored fields to return as part of a hit + * @param {<>, <>, <>} params.docvalueFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit + * @param {<>} params.from - Starting offset (default: 0) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.searchType - Search operation type + * @param {<>} params.size - Number of hits to return (default: 10) + * @param {<>, <>, <>} params.sort - A comma-separated list of : pairs + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * @param {<>, <>, <>} params.stats - Specific 'tag' of the request for logging and statistical purposes + * @param {<>} params.suggestField - Specify which field to use for suggestions + * @param {<>} [params.suggestMode=missing] - Specify suggest mode + * @param {<>} params.suggestSize - How many suggestions to return in response + * @param {<>} params.suggestText - The source text for which the suggestions should be returned + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting + * @param {<>} params.trackTotalHits - Indicate if the number of documents that match the query should be tracked + * @param {<>} [params.allowPartialSearchResults=true] - Indicate if an error should be returned if there is a partial search failure or timeout + * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * @param {<>} params.version - Specify whether to return document version as part of a hit + * @param {<>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting + * @param {<>} [params.batchedReduceSize=512] - The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. + * @param {<>} [params.maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.] - The number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + * @param {<>} [params.preFilterShardSize=128] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.search = ca({ + params: { + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + explain: { + type: 'boolean' + }, + storedFields: { + type: 'list', + name: 'stored_fields' + }, + docvalueFields: { + type: 'list', + name: 'docvalue_fields' + }, + from: { + type: 'number' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + lenient: { + type: 'boolean' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'time' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'dfs_query_then_fetch' + ], + name: 'search_type' + }, + size: { + type: 'number' + }, + sort: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + }, + stats: { + type: 'list' + }, + suggestField: { + type: 'string', + name: 'suggest_field' + }, + suggestMode: { + type: 'enum', + 'default': 'missing', + options: [ + 'missing', + 'popular', + 'always' + ], + name: 'suggest_mode' + }, + suggestSize: { + type: 'number', + name: 'suggest_size' + }, + suggestText: { + type: 'string', + name: 'suggest_text' + }, + timeout: { + type: 'time' + }, + trackScores: { + type: 'boolean', + name: 'track_scores' + }, + trackTotalHits: { + type: 'boolean', + name: 'track_total_hits' + }, + allowPartialSearchResults: { + type: 'boolean', + 'default': true, + name: 'allow_partial_search_results' + }, + typedKeys: { + type: 'boolean', + name: 'typed_keys' + }, + version: { + type: 'boolean' + }, + requestCache: { + type: 'boolean', + name: 'request_cache' + }, + batchedReduceSize: { + type: 'number', + 'default': 512, + name: 'batched_reduce_size' + }, + maxConcurrentShardRequests: { + type: 'number', + 'default': 'The default grows with the number of nodes in the cluster but is at most 256.', + name: 'max_concurrent_shard_requests' + }, + preFilterShardSize: { + type: 'number', + 'default': 128, + name: 'pre_filter_shard_size' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchShards](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.routing - Specific routing value + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + +/** + * Perform a [searchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-template.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.searchType - Search operation type + * @param {<>} params.explain - Specify whether to return detailed information about score computation as part of a hit + * @param {<>} params.profile - Specify whether to profile the query execution + * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.searchTemplate = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + preference: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'time' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'query_and_fetch', + 'dfs_query_then_fetch', + 'dfs_query_and_fetch' + ], + name: 'search_type' + }, + explain: { + type: 'boolean' + }, + profile: { + type: 'boolean' + }, + typedKeys: { + type: 'boolean', + name: 'typed_keys' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search/template', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_search/template', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_search/template' + } + ], + needBody: true, + method: 'POST' +}); + +api.snapshot = namespace(); + +/** + * Perform a [snapshot.create](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {<>} params.repository - A repository name + * @param {<>} params.snapshot - A snapshot name + */ +api.snapshot.prototype.create = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.createRepository](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.verify - Whether to verify the repository after creation + * @param {<>} params.repository - A repository name + */ +api.snapshot.prototype.createRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + }, + verify: { + type: 'boolean' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'string' + } + } + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [snapshot.delete](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.repository - A repository name + * @param {<>} params.snapshot - A snapshot name + */ +api.snapshot.prototype['delete'] = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.deleteRepository](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.deleteRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + method: 'DELETE' +}); + +/** + * Perform a [snapshot.get](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + * @param {<>} params.verbose - Whether to show verbose snapshot info or only show the basic info found in the repository index blob + * @param {<>} params.repository - A repository name + * @param {<>, <>, <>} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.get = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + verbose: { + type: 'boolean' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + } +}); + +/** + * Perform a [snapshot.getRepository](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {<>, <>, <>} params.repository - A comma-separated list of repository names + */ +api.snapshot.prototype.getRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + local: { + type: 'boolean' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>', + req: { + repository: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot' + } + ] +}); + +/** + * Perform a [snapshot.restore](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.waitForCompletion - Should this request wait until the operation has completed before returning + * @param {<>} params.repository - A repository name + * @param {<>} params.snapshot - A snapshot name + */ +api.snapshot.prototype.restore = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + waitForCompletion: { + type: 'boolean', + 'default': false, + name: 'wait_for_completion' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'string' + } + } + }, + method: 'POST' +}); + +/** + * Perform a [snapshot.status](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + * @param {<>} params.repository - A repository name + * @param {<>, <>, <>} params.snapshot - A comma-separated list of snapshot names + */ +api.snapshot.prototype.status = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + } + }, + urls: [ + { + fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status', + req: { + repository: { + type: 'string' + }, + snapshot: { + type: 'list' + } + } + }, + { + fmt: '/_snapshot/<%=repository%>/_status', + req: { + repository: { + type: 'string' + } + } + }, + { + fmt: '/_snapshot/_status' + } + ] +}); + +/** + * Perform a [snapshot.verifyRepository](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-snapshots.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.masterTimeout - Explicit operation timeout for connection to master node + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.repository - A repository name + */ +api.snapshot.prototype.verifyRepository = ca({ + params: { + masterTimeout: { + type: 'time', + name: 'master_timeout' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_snapshot/<%=repository%>/_verify', + req: { + repository: { + type: 'string' + } + } + }, + method: 'POST' +}); + +api.tasks = namespace(); + +/** + * Perform a [tasks.cancel](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.nodes - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {<>, <>, <>} params.actions - A comma-separated list of actions that should be cancelled. Leave empty to cancel all. + * @param {<>} params.parentTaskId - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. + * @param {<>} params.taskId - Cancel the task with specified task id (node_id:task_number) + */ +api.tasks.prototype.cancel = ca({ + params: { + nodes: { + type: 'list' + }, + actions: { + type: 'list' + }, + parentTaskId: { + type: 'string', + name: 'parent_task_id' + } + }, + urls: [ + { + fmt: '/_tasks/<%=taskId%>/_cancel', + req: { + taskId: { + type: 'string' + } + } + }, + { + fmt: '/_tasks/_cancel' + } + ], + method: 'POST' +}); + +/** + * Perform a [tasks.get](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForCompletion - Wait for the matching tasks to complete (default: false) + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.taskId - Return the task with specified id (node_id:task_number) + */ +api.tasks.prototype.get = ca({ + params: { + waitForCompletion: { + type: 'boolean', + name: 'wait_for_completion' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_tasks/<%=taskId%>', + req: { + taskId: { + type: 'string' + } + } + } +}); + +/** + * Perform a [tasks.list](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tasks.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>, <>, <>} params.nodes - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {<>, <>, <>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all. + * @param {<>} params.detailed - Return detailed task information (default: false) + * @param {<>} params.parentTaskId - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. + * @param {<>} params.waitForCompletion - Wait for the matching tasks to complete (default: false) + * @param {<>} [params.groupBy=nodes] - Group tasks by nodes or parent/child relationships + * @param {<>} params.timeout - Explicit operation timeout + */ +api.tasks.prototype.list = ca({ + params: { + nodes: { + type: 'list' + }, + actions: { + type: 'list' + }, + detailed: { + type: 'boolean' + }, + parentTaskId: { + type: 'string', + name: 'parent_task_id' + }, + waitForCompletion: { + type: 'boolean', + name: 'wait_for_completion' + }, + groupBy: { + type: 'enum', + 'default': 'nodes', + options: [ + 'nodes', + 'parents', + 'none' + ], + name: 'group_by' + }, + timeout: { + type: 'time' + } + }, + url: { + fmt: '/_tasks' + } +}); + +/** + * Perform a [termvectors](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-termvectors.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. + * @param {<>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. + * @param {<>, <>, <>} params.fields - A comma-separated list of fields to return. + * @param {<>} [params.offsets=true] - Specifies if term offsets should be returned. + * @param {<>} [params.positions=true] - Specifies if term positions should be returned. + * @param {<>} [params.payloads=true] - Specifies if term payloads should be returned. + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random). + * @param {<>} params.routing - Specific routing value. + * @param {<>} params.parent - Parent id of documents. + * @param {<>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true). + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.index - The index in which the document resides. + * @param {<>} params.type - The type of the document. + * @param {<>} params.id - The id of the document, when not specified a doc param should be supplied. + */ +api.termvectors = ca({ + params: { + termStatistics: { + type: 'boolean', + 'default': false, + required: false, + name: 'term_statistics' + }, + fieldStatistics: { + type: 'boolean', + 'default': true, + required: false, + name: 'field_statistics' + }, + fields: { + type: 'list', + required: false + }, + offsets: { + type: 'boolean', + 'default': true, + required: false + }, + positions: { + type: 'boolean', + 'default': true, + required: false + }, + payloads: { + type: 'boolean', + 'default': true, + required: false + }, + preference: { + type: 'string', + required: false + }, + routing: { + type: 'string', + required: false + }, + parent: { + type: 'string', + required: false + }, + realtime: { + type: 'boolean', + required: false + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_termvectors', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [update](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-update.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update 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 {<>, <>, <>} params.fields - A comma-separated list of fields to return in the response + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.lang - The script language (default: painless) + * @param {<>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request + * @param {<>} params.refresh - If `true` then refresh the effected 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 {<>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0) + * @param {<>} params.routing - Specific routing value + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>} params.version - Explicit version number for concurrency control + * @param {<>} params.versionType - Specific version type + * @param {<>} params.id - Document ID + * @param {<>} params.index - The name of the index + * @param {<>} params.type - The type of the document + */ +api.update = ca({ + params: { + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + fields: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + lang: { + type: 'string' + }, + parent: { + type: 'string' + }, + refresh: { + type: 'enum', + options: [ + 'true', + 'false', + 'wait_for', + '' + ] + }, + retryOnConflict: { + type: 'number', + name: 'retry_on_conflict' + }, + routing: { + type: 'string' + }, + timeout: { + type: 'time' + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'force' + ], + name: 'version_type' + } + }, + url: { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_update', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + needBody: true, + method: 'POST' +}); + +/** + * Perform a [updateByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-update-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.analyzer - The analyzer to use for the query string + * @param {<>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) + * @param {<>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) + * @param {<>} params.df - The field to use as default where no field prefix is given in the query string + * @param {<>} params.from - Starting offset (default: 0) + * @param {<>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {<>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {<>} [params.conflicts=abort] - What to do when the update by query hits version conflicts? + * @param {<>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {<>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * @param {<>} params.pipeline - Ingest pipeline to set on index requests made by this action. (default: none) + * @param {<>} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {<>} params.q - Query in the Lucene query string syntax + * @param {<>, <>, <>} params.routing - A comma-separated list of specific routing values + * @param {<>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search + * @param {<>} params.searchType - Search operation type + * @param {<>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout. + * @param {<>} params.size - Number of hits to return (default: 10) + * @param {<>, <>, <>} params.sort - A comma-separated list of : pairs + * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * @param {<>, <>, <>} params.stats - Specific 'tag' of the request for logging and statistical purposes + * @param {<>} params.version - Specify whether to return document version as part of a hit + * @param {<>} params.versionType - Should the document increment the version number (internal) on hit or not (reindex) + * @param {<>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting + * @param {<>} params.refresh - Should the effected indexes be refreshed? + * @param {<>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. + * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update by query 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 {<>} params.scrollSize - Size on the scroll request powering the update by query + * @param {<>} [params.waitForCompletion=true] - Should the request should block until the update by query operation is complete. + * @param {<>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle. + * @param {<>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + * @param {<>, <>, <>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {<>, <>, <>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types + */ +api.updateByQuery = ca({ + params: { + analyzer: { + type: 'string' + }, + analyzeWildcard: { + type: 'boolean', + name: 'analyze_wildcard' + }, + defaultOperator: { + type: 'enum', + 'default': 'OR', + options: [ + 'AND', + 'OR' + ], + name: 'default_operator' + }, + df: { + type: 'string' + }, + from: { + type: 'number' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + conflicts: { + type: 'enum', + 'default': 'abort', + options: [ + 'abort', + 'proceed' + ] + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + }, + lenient: { + type: 'boolean' + }, + pipeline: { + type: 'string' + }, + preference: { + type: 'string' + }, + q: { + type: 'string' + }, + routing: { + type: 'list' + }, + scroll: { + type: 'time' + }, + searchType: { + type: 'enum', + options: [ + 'query_then_fetch', + 'dfs_query_then_fetch' + ], + name: 'search_type' + }, + searchTimeout: { + type: 'time', + name: 'search_timeout' + }, + size: { + type: 'number' + }, + sort: { + type: 'list' + }, + _source: { + type: 'list' + }, + _sourceExclude: { + type: 'list', + name: '_source_exclude' + }, + _sourceInclude: { + type: 'list', + name: '_source_include' + }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + }, + stats: { + type: 'list' + }, + version: { + type: 'boolean' + }, + versionType: { + type: 'boolean', + name: 'version_type' + }, + requestCache: { + type: 'boolean', + name: 'request_cache' + }, + refresh: { + type: 'boolean' + }, + timeout: { + type: 'time', + 'default': '1m' + }, + waitForActiveShards: { + type: 'string', + name: 'wait_for_active_shards' + }, + scrollSize: { + type: 'number', + name: 'scroll_size' + }, + waitForCompletion: { + type: 'boolean', + 'default': true, + name: 'wait_for_completion' + }, + requestsPerSecond: { + type: 'number', + 'default': 0, + name: 'requests_per_second' + }, + slices: { + type: 'number', + 'default': 1 + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_update_by_query', + req: { + index: { + type: 'list' + }, + type: { + type: 'list' + } + } + }, + { + fmt: '/<%=index%>/_update_by_query', + req: { + index: { + type: 'list' + } + } + } + ], + method: 'POST' +}); + +/** + * Perform a [updateByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-update-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.updateByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_update_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); diff --git a/src/lib/apis/6_x.js b/src/lib/apis/6_x.js index 043ba5faf..ddb5c224e 100644 --- a/src/lib/apis/6_x.js +++ b/src/lib/apis/6_x.js @@ -2085,6 +2085,32 @@ api.deleteByQuery = ca({ method: 'POST' }); +/** + * Perform a [deleteByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.deleteByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_delete_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); + /** * Perform a [deleteScript](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/modules-scripting.html) request * @@ -4961,6 +4987,7 @@ api.mget = ca({ * @param {<>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response * @param {<>} [params.preFilterShardSize=128] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {<>} [params.maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.] - The number of concurrent shard requests each sub search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests * @param {<>, <>, <>} params.index - A comma-separated list of index names to use as default * @param {<>, <>, <>} params.type - A comma-separated list of document types to use as default */ @@ -4988,6 +5015,11 @@ api.msearch = ca({ type: 'number', 'default': 128, name: 'pre_filter_shard_size' + }, + maxConcurrentShardRequests: { + type: 'number', + 'default': 'The default grows with the number of nodes in the cluster but is at most 256.', + name: 'max_concurrent_shard_requests' } }, urls: [ @@ -5324,6 +5356,35 @@ api.nodes.prototype.info = ca({ ] }); +/** + * Perform a [nodes.reloadSecureSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/secure-settings.html#reloadable-secure-settings) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. + */ +api.nodes.prototype.reloadSecureSettings = ca({ + params: { + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/reload_secure_settings', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/reload_secure_settings' + } + ], + method: 'POST' +}); + /** * Perform a [nodes.stats](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/cluster-nodes-stats.html) request * @@ -7070,3 +7131,29 @@ api.updateByQuery = ca({ ], method: 'POST' }); + +/** + * Perform a [updateByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/docs-update-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.updateByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_update_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); diff --git a/src/lib/apis/browser_index.js b/src/lib/apis/browser_index.js index 9cf82a4fd..b416ae673 100644 --- a/src/lib/apis/browser_index.js +++ b/src/lib/apis/browser_index.js @@ -1,10 +1,10 @@ module.exports = { - '_default': require('./6_3'), + '6.5': require('./6_5'), + '_default': require('./6_4'), + '6.4': require('./6_4'), '6.3': require('./6_3'), '6.2': require('./6_2'), '6.1': require('./6_1'), - '6.0': require('./6_0'), - '5.6': require('./5_6'), '6.x': require('./6_x'), 'master': require('./master') }; diff --git a/src/lib/apis/index.js b/src/lib/apis/index.js index 4d89f0dad..ef83c893d 100644 --- a/src/lib/apis/index.js +++ b/src/lib/apis/index.js @@ -1,5 +1,7 @@ module.exports = { - get '_default'() { return require('./6_3'); }, + get '6.5'() { return require('./6_5'); }, + get '_default'() { return require('./6_4'); }, + get '6.4'() { return require('./6_4'); }, get '6.3'() { return require('./6_3'); }, get '6.2'() { return require('./6_2'); }, get '6.1'() { return require('./6_1'); }, diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index 258ef5250..a8d0b9743 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -24,8 +24,8 @@ api._namespaces = ['cat', 'cluster', 'indices', 'ingest', 'nodes', 'snapshot', ' * @param {<>} params.timeout - Explicit operation timeout * @param {<>} params.type - Default document type for items which don't provide one * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request - * @param {<>, <>, <>} params._sourceExclude - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request - * @param {<>, <>, <>} params._sourceInclude - Default list of fields to extract and return from the _source field, can be overridden on each sub-request + * @param {<>, <>, <>} params._sourceExcludes - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request + * @param {<>, <>, <>} params._sourceIncludes - Default list of fields to extract and return from the _source field, can be overridden on each sub-request * @param {<>} params.pipeline - The pipeline id to preprocess incoming documents with * @param {<>} params.index - Default index for items which don't provide one */ @@ -60,13 +60,13 @@ api.bulk = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' }, pipeline: { type: 'string' @@ -1924,8 +1924,8 @@ api['delete'] = ca({ * @param {<>} params.size - Number of hits to return (default: 10) * @param {<>, <>, <>} params.sort - A comma-separated list of : pairs * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return - * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field - * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. * @param {<>, <>, <>} params.stats - Specific 'tag' of the request for logging and statistical purposes * @param {<>} params.version - Specify whether to return document version as part of a hit @@ -2027,13 +2027,13 @@ api.deleteByQuery = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' }, terminateAfter: { type: 'number', @@ -2104,6 +2104,32 @@ api.deleteByQuery = ca({ method: 'POST' }); +/** + * Perform a [deleteByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.deleteByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_delete_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); + /** * Perform a [deleteScript](https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request * @@ -2144,8 +2170,8 @@ api.deleteScript = ca({ * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation * @param {<>} params.routing - Specific routing value * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return - * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field - * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>} params.version - Explicit version number for concurrency control * @param {<>} params.versionType - Specific version type * @param {<>} params.id - The document ID @@ -2176,13 +2202,13 @@ api.exists = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' }, version: { type: 'number' @@ -2225,8 +2251,8 @@ api.exists = ca({ * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation * @param {<>} params.routing - Specific routing value * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return - * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field - * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>} params.version - Explicit version number for concurrency control * @param {<>} params.versionType - Specific version type * @param {<>} params.id - The document ID @@ -2253,13 +2279,13 @@ api.existsSource = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' }, version: { type: 'number' @@ -2307,8 +2333,8 @@ api.existsSource = ca({ * @param {<>} params.q - Query in the Lucene query string syntax * @param {<>} params.routing - Specific routing value * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return - * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field - * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>} params.id - The document ID * @param {<>} params.index - The name of the index * @param {<>} params.type - The type of the document @@ -2356,13 +2382,13 @@ api.explain = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' } }, url: { @@ -2445,6 +2471,8 @@ api.fieldCaps = ca({ * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation * @param {<>} params.routing - Specific routing value * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field * @param {<>} params.version - Explicit version number for concurrency control @@ -2481,6 +2509,14 @@ api.get = ca({ _source: { type: 'list' }, + _sourceExcludes: { + type: 'list', + name: '_source_excludes' + }, + _sourceIncludes: { + type: 'list', + name: '_source_includes' + }, _sourceExclude: { type: 'list', name: '_source_exclude' @@ -2566,8 +2602,8 @@ api.getScript = ca({ * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation * @param {<>} params.routing - Specific routing value * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return - * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field - * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>} params.version - Explicit version number for concurrency control * @param {<>} params.versionType - Specific version type * @param {<>} params.id - The document ID @@ -2594,13 +2630,13 @@ api.getSource = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' }, version: { type: 'number' @@ -4954,8 +4990,8 @@ api.ingest.prototype.simulate = ca({ * @param {<>} params.refresh - Refresh the shard containing the document before performing the operation * @param {<>} params.routing - Specific routing value * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return - * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field - * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>} params.index - The name of the index * @param {<>} params.type - The type of the document */ @@ -4980,13 +5016,13 @@ api.mget = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' } }, urls: [ @@ -5025,6 +5061,7 @@ api.mget = ca({ * @param {<>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response * @param {<>} [params.preFilterShardSize=128] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {<>} [params.maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.] - The number of concurrent shard requests each sub search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests * @param {<>, <>, <>} params.index - A comma-separated list of index names to use as default * @param {<>, <>, <>} params.type - A comma-separated list of document types to use as default */ @@ -5052,6 +5089,11 @@ api.msearch = ca({ type: 'number', 'default': 128, name: 'pre_filter_shard_size' + }, + maxConcurrentShardRequests: { + type: 'number', + 'default': 'The default grows with the number of nodes in the cluster but is at most 256.', + name: 'max_concurrent_shard_requests' } }, urls: [ @@ -5388,6 +5430,35 @@ api.nodes.prototype.info = ca({ ] }); +/** + * Perform a [nodes.reloadSecureSettings](https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. + */ +api.nodes.prototype.reloadSecureSettings = ca({ + params: { + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/reload_secure_settings', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/reload_secure_settings' + } + ], + method: 'POST' +}); + /** * Perform a [nodes.stats](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html) request * @@ -5920,8 +5991,8 @@ api.scroll = ca({ * @param {<>} params.size - Number of hits to return (default: 10) * @param {<>, <>, <>} params.sort - A comma-separated list of : pairs * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return - * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field - * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. * @param {<>, <>, <>} params.stats - Specific 'tag' of the request for logging and statistical purposes * @param {<>} params.suggestField - Specify which field to use for suggestions @@ -6031,13 +6102,13 @@ api.search = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' }, terminateAfter: { type: 'number', @@ -6840,8 +6911,8 @@ api.termvectors = ca({ * @param {<>} params.includeTypeName - Whether to add the type name to the response * @param {<>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update 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 {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return - * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field - * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>} params.lang - The script language (default: painless) * @param {<>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request * @param {<>} params.refresh - If `true` then refresh the effected 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. @@ -6867,13 +6938,13 @@ api.update = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' }, lang: { type: 'string' @@ -6967,8 +7038,8 @@ api.update = ca({ * @param {<>} params.size - Number of hits to return (default: 10) * @param {<>, <>, <>} params.sort - A comma-separated list of : pairs * @param {<>, <>, <>} params._source - True or false to return the _source field or not, or a list of fields to return - * @param {<>, <>, <>} params._sourceExclude - A list of fields to exclude from the returned _source field - * @param {<>, <>, <>} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {<>, <>, <>} params._sourceExcludes - A list of fields to exclude from the returned _source field + * @param {<>, <>, <>} params._sourceIncludes - A list of fields to extract and return from the _source field * @param {<>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. * @param {<>, <>, <>} params.stats - Specific 'tag' of the request for logging and statistical purposes * @param {<>} params.version - Specify whether to return document version as part of a hit @@ -7074,13 +7145,13 @@ api.updateByQuery = ca({ _source: { type: 'list' }, - _sourceExclude: { + _sourceExcludes: { type: 'list', - name: '_source_exclude' + name: '_source_excludes' }, - _sourceInclude: { + _sourceIncludes: { type: 'list', - name: '_source_include' + name: '_source_includes' }, terminateAfter: { type: 'number', @@ -7153,3 +7224,29 @@ api.updateByQuery = ca({ ], method: 'POST' }); + +/** + * Perform a [updateByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.updateByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_update_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +});