[[api-reference]]
== API Reference

////////

This documentation is generated by running:
node scripts/run.js --tag v7.0.0-beta

////////

=== Common parameters
Parameters that are accepted by all API endpoints.

link:{ref}/common-options.html[Reference]
[cols=2*]
|===
|`pretty`
|`boolean` - Pretty format the returned JSON response.

|`human`
|`boolean` - Return human readable values for statistics. +
    _Default:_ `true`

|`error_trace` or `errorTrace`
|`boolean` - Include the stack trace of returned errors.

|`source`
|`string` - The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

|`filter_path` or `filterPath`
|`list` - A comma-separated list of filters used to reduce the respone.

|===
=== bulk
[source,js]
----
client.bulk([params] [, options] [, callback])
----
link:{ref}/docs-bulk.html[Reference]
[cols=2*]
|===
|`index`
|`string` - Default index for items which don't provide one

|`type`
|`string` - Default document type for items which don't provide one

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - 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`
|`'true', 'false', 'wait_for'` - 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.

|`routing`
|`string` - Specific routing value

|`timeout`
|`string` - Explicit operation timeout

|`type`
|`string` - Default document type for items which don't provide one

|`fields`
|`string, string[]` - Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request

|`_source`
|`string, string[]` - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request

|`_source_include` or `_sourceInclude`
|`string, string[]` - Default list of fields to extract and return from the _source field, can be overridden on each sub-request

|`pipeline`
|`string` - The pipeline id to preprocess incoming documents with

|`body`
|`object` - The operation definition and data (action-data pairs), separated by newlines

|===

=== cat.aliases
[source,js]
----
client.cat.aliases([params] [, options] [, callback])
----
link:{ref}/cat-alias.html[Reference]
[cols=2*]
|===
|`name`
|`string, string[]` - A comma-separated list of alias names to return

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.allocation
[source,js]
----
client.cat.allocation([params] [, options] [, callback])
----
link:{ref}/cat-allocation.html[Reference]
[cols=2*]
|===
|`node_id` or `nodeId`
|`string, string[]` - A comma-separated list of node IDs or names to limit the returned information

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`bytes`
|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.count
[source,js]
----
client.cat.count([params] [, options] [, callback])
----
link:{ref}/cat-count.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to limit the returned information

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.fielddata
[source,js]
----
client.cat.fielddata([params] [, options] [, callback])
----
link:{ref}/cat-fielddata.html[Reference]
[cols=2*]
|===
|`fields`
|`string, string[]` - A comma-separated list of fields to return the fielddata size

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`bytes`
|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|`fields`
|`string, string[]` - A comma-separated list of fields to return in the output

|===

=== cat.health
[source,js]
----
client.cat.health([params] [, options] [, callback])
----
link:{ref}/cat-health.html[Reference]
[cols=2*]
|===
|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`ts`
|`boolean` - Set to false to disable timestamping +
_Default:_ `true`

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.help
[source,js]
----
client.cat.help([params] [, options] [, callback])
----
link:{ref}/cat.html[Reference]
[cols=2*]
|===
|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|===

=== cat.indices
[source,js]
----
client.cat.indices([params] [, options] [, callback])
----
link:{ref}/cat-indices.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to limit the returned information

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`bytes`
|`'b', 'k', 'm', 'g'` - The unit in which to display byte values

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`health`
|`'green', 'yellow', 'red'` - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status

|`help`
|`boolean` - Return help information

|`pri`
|`boolean` - Set to true to return stats only for primary shards

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.master
[source,js]
----
client.cat.master([params] [, options] [, callback])
----
link:{ref}/cat-master.html[Reference]
[cols=2*]
|===
|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.nodeattrs
[source,js]
----
client.cat.nodeattrs([params] [, options] [, callback])
----
link:{ref}/cat-nodeattrs.html[Reference]
[cols=2*]
|===
|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.nodes
[source,js]
----
client.cat.nodes([params] [, options] [, callback])
----
link:{ref}/cat-nodes.html[Reference]
[cols=2*]
|===
|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`full_id` or `fullId`
|`boolean` - Return the full node ID instead of the shortened version (default: false)

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.pendingTasks
[source,js]
----
client.cat.pendingTasks([params] [, options] [, callback])
----
link:{ref}/cat-pending-tasks.html[Reference]
[cols=2*]
|===
|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.plugins
[source,js]
----
client.cat.plugins([params] [, options] [, callback])
----
link:{ref}/cat-plugins.html[Reference]
[cols=2*]
|===
|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.recovery
[source,js]
----
client.cat.recovery([params] [, options] [, callback])
----
link:{ref}/cat-recovery.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to limit the returned information

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`bytes`
|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.repositories
[source,js]
----
client.cat.repositories([params] [, options] [, callback])
----
link:{ref}/cat-repositories.html[Reference]
[cols=2*]
|===
|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`local`
|`boolean` - Return local information, do not retrieve the state from master node

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.segments
[source,js]
----
client.cat.segments([params] [, options] [, callback])
----
link:{ref}/cat-segments.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to limit the returned information

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`bytes`
|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.shards
[source,js]
----
client.cat.shards([params] [, options] [, callback])
----
link:{ref}/cat-shards.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to limit the returned information

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`bytes`
|`'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'` - The unit in which to display byte values

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.snapshots
[source,js]
----
client.cat.snapshots([params] [, options] [, callback])
----
link:{ref}/cat-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string, string[]` - Name of repository from which to fetch the snapshot information

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Set to true to ignore unavailable snapshots

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.tasks
[source,js]
----
client.cat.tasks([params] [, options] [, callback])
----
link:{ref}/tasks.html[Reference]
[cols=2*]
|===
|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`node_id` or `nodeId`
|`string, string[]` - 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`
|`string, string[]` - A comma-separated list of actions that should be returned. Leave empty to return all.

|`detailed`
|`boolean` - Return detailed task information (default: false)

|`parent_node` or `parentNode`
|`string` - Return tasks with specified parent node.

|`parent_task` or `parentTask`
|`number` - Return tasks with specified parent task id. Set to -1 to return all.

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.templates
[source,js]
----
client.cat.templates([params] [, options] [, callback])
----
link:{ref}/cat-templates.html[Reference]
[cols=2*]
|===
|`name`
|`string` - A pattern that returned template names must match

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== cat.threadPool
[source,js]
----
client.cat.threadPool([params] [, options] [, callback])
----
link:{ref}/cat-thread-pool.html[Reference]
[cols=2*]
|===
|`thread_pool_patterns` or `threadPoolPatterns`
|`string, string[]` - A comma-separated list of regular-expressions to filter the thread pools in the output

|`format`
|`string` - a short version of the Accept header, e.g. json, yaml

|`size`
|`'', 'k', 'm', 'g', 't', 'p'` - The multiplier in which to display values

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`h`
|`string, string[]` - Comma-separated list of column names to display

|`help`
|`boolean` - Return help information

|`s`
|`string, string[]` - Comma-separated list of column names or column aliases to sort by

|`v`
|`boolean` - Verbose mode. Display column headers

|===

=== clearScroll
[source,js]
----
client.clearScroll([params] [, options] [, callback])
----
link:{ref}/search-request-scroll.html[Reference]
[cols=2*]
|===
|`scroll_id` or `scrollId`
|`string, string[]` - A comma-separated list of scroll IDs to clear

|`body`
|`object` - A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter

|===

=== cluster.allocationExplain
[source,js]
----
client.cluster.allocationExplain([params] [, options] [, callback])
----
link:{ref}/cluster-allocation-explain.html[Reference]
[cols=2*]
|===
|`include_yes_decisions` or `includeYesDecisions`
|`boolean` - Return 'YES' decisions in explanation (default: false)

|`include_disk_info` or `includeDiskInfo`
|`boolean` - Return information about disk usage and shard sizes (default: false)

|`body`
|`object` - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'

|===

=== cluster.getSettings
[source,js]
----
client.cluster.getSettings([params] [, options] [, callback])
----
link:{ref}/cluster-update-settings.html[Reference]
[cols=2*]
|===
|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`timeout`
|`string` - Explicit operation timeout

|`include_defaults` or `includeDefaults`
|`boolean` - Whether to return all default clusters setting.

|===

=== cluster.health
[source,js]
----
client.cluster.health([params] [, options] [, callback])
----
link:{ref}/cluster-health.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - Limit the information returned to a specific index

|`level`
|`'cluster', 'indices', 'shards'` - Specify the level of detail for returned information +
_Default:_ `cluster`

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`timeout`
|`string` - Explicit operation timeout

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - Wait until the specified number of shards is active

|`wait_for_nodes` or `waitForNodes`
|`string` - Wait until the specified number of nodes is available

|`wait_for_events` or `waitForEvents`
|`'immediate', 'urgent', 'high', 'normal', 'low', 'languid'` - Wait until all currently queued events with the given priority are processed

|`wait_for_no_relocating_shards` or `waitForNoRelocatingShards`
|`boolean` - Whether to wait until there are no relocating shards in the cluster

|`wait_for_status` or `waitForStatus`
|`'green', 'yellow', 'red'` - Wait until cluster is in a specific state

|===

=== cluster.pendingTasks
[source,js]
----
client.cluster.pendingTasks([params] [, options] [, callback])
----
link:{ref}/cluster-pending.html[Reference]
[cols=2*]
|===
|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|===

=== cluster.putSettings
[source,js]
----
client.cluster.putSettings([params] [, options] [, callback])
----
link:{ref}/cluster-update-settings.html[Reference]
[cols=2*]
|===
|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`timeout`
|`string` - Explicit operation timeout

|`body`
|`object` - The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).

|===

=== cluster.remoteInfo
[source,js]
----
client.cluster.remoteInfo([params] [, options] [, callback])
----
link:{ref}/cluster-remote-info.html[Reference]


=== cluster.reroute
[source,js]
----
client.cluster.reroute([params] [, options] [, callback])
----
link:{ref}/cluster-reroute.html[Reference]
[cols=2*]
|===
|`dry_run` or `dryRun`
|`boolean` - Simulate the operation only and return the resulting state

|`explain`
|`boolean` - Return an explanation of why the commands can or cannot be executed

|`retry_failed` or `retryFailed`
|`boolean` - Retries allocation of shards that are blocked due to too many subsequent allocation failures

|`metric`
|`string, string[]` - Limit the information returned to the specified metrics. Defaults to all but metadata

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`timeout`
|`string` - Explicit operation timeout

|`body`
|`object` - The definition of `commands` to perform (`move`, `cancel`, `allocate`)

|===

=== cluster.state
[source,js]
----
client.cluster.state([params] [, options] [, callback])
----
link:{ref}/cluster-state.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`metric`
|`string, string[]` - Limit the information returned to the specified metrics

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|===

=== cluster.stats
[source,js]
----
client.cluster.stats([params] [, options] [, callback])
----
link:{ref}/cluster-stats.html[Reference]
[cols=2*]
|===
|`node_id` or `nodeId`
|`string, string[]` - 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

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`timeout`
|`string` - Explicit operation timeout

|===

=== count
[source,js]
----
client.count([params] [, options] [, callback])
----
link:{ref}/search-count.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of indices to restrict the results

|`type`
|`string, string[]` - A comma-separated list of types to restrict the results

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`min_score` or `minScore`
|`number` - Include only documents with a specific `_score` value in the result

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`routing`
|`string, string[]` - A comma-separated list of specific routing values

|`q`
|`string` - Query in the Lucene query string syntax

|`analyzer`
|`string` - The analyzer to use for the query string

|`analyze_wildcard` or `analyzeWildcard`
|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)

|`default_operator` or `defaultOperator`
|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
_Default:_ `OR`

|`df`
|`string` - The field to use as default where no field prefix is given in the query string

|`lenient`
|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

|`terminate_after` or `terminateAfter`
|`number` - The maximum count for each shard, upon reaching which the query execution will terminate early

|`body`
|`object` - A query to restrict the results specified with the Query DSL (optional)

|===

=== countPercolate
[source,js]
----
client.countPercolate([params] [, options] [, callback])
----
link:{ref}/search-percolate.html[Reference]
[cols=2*]
|===
|`index`
|`string` - The index of the document being count percolated.

|`type`
|`string` - The type of the document being count percolated.

|`id`
|`string` - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.

|`routing`
|`string, string[]` - A comma-separated list of specific routing values

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`percolate_index` or `percolateIndex`
|`string` - The index to count percolate the document into. Defaults to index.

|`percolate_type` or `percolateType`
|`string` - The type to count percolate document into. Defaults to type.

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|`body`
|`object` - The count percolator request definition using the percolate DSL

|===

=== create
[source,js]
----
client.create([params] [, options] [, callback])
----
link:{ref}/docs-index_.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Document ID

|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)

|`parent`
|`string` - ID of the parent document

|`refresh`
|`'true', 'false', 'wait_for'` - 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.

|`routing`
|`string` - Specific routing value

|`timeout`
|`string` - Explicit operation timeout

|`timestamp`
|`string` - Explicit timestamp for the document

|`ttl`
|`string` - Expiration time for the document

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|`pipeline`
|`string` - The pipeline id to preprocess incoming documents with

|`body`
|`object` - The document

|===

=== delete
[source,js]
----
client.delete([params] [, options] [, callback])
----
link:{ref}/docs-delete.html[Reference]
[cols=2*]
|===
|`id`
|`string` - The document ID

|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - 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`
|`string` - ID of parent document

|`refresh`
|`'true', 'false', 'wait_for'` - 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.

|`routing`
|`string` - Specific routing value

|`timeout`
|`string` - Explicit operation timeout

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|===

=== deleteByQuery
[source,js]
----
client.deleteByQuery([params] [, options] [, callback])
----
link:{ref}/docs-delete-by-query.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices

|`type`
|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types

|`analyzer`
|`string` - The analyzer to use for the query string

|`analyze_wildcard` or `analyzeWildcard`
|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)

|`default_operator` or `defaultOperator`
|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
_Default:_ `OR`

|`df`
|`string` - The field to use as default where no field prefix is given in the query string

|`from`
|`number` - Starting offset (default: 0)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - 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', 'proceed'` - What to do when the delete-by-query hits version conflicts? +
_Default:_ `abort`

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`lenient`
|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`q`
|`string` - Query in the Lucene query string syntax

|`routing`
|`string, string[]` - A comma-separated list of specific routing values

|`scroll`
|`string` - Specify how long a consistent view of the index should be maintained for scrolled search

|`search_type` or `searchType`
|`'query_then_fetch', 'dfs_query_then_fetch'` - Search operation type

|`search_timeout` or `searchTimeout`
|`string` - Explicit timeout for each search request. Defaults to no timeout.

|`size`
|`number` - Number of hits to return (default: 10)

|`sort`
|`string, string[]` - A comma-separated list of <field>:<direction> pairs

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`terminate_after` or `terminateAfter`
|`number` - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.

|`stats`
|`string, string[]` - Specific 'tag' of the request for logging and statistical purposes

|`version`
|`boolean` - Specify whether to return document version as part of a hit

|`request_cache` or `requestCache`
|`boolean` - Specify if request cache should be used for this request or not, defaults to index level setting

|`refresh`
|`boolean` - Should the effected indexes be refreshed?

|`timeout`
|`string` - Time each individual bulk request should wait for shards that are unavailable. +
_Default:_ `1m`

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - 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)

|`scroll_size` or `scrollSize`
|`number` - Size on the scroll request powering the update_by_query

|`wait_for_completion` or `waitForCompletion`
|`boolean` - Should the request should block until the delete-by-query is complete. +
_Default:_ `true`

|`requests_per_second` or `requestsPerSecond`
|`number` - The throttle for this request in sub-requests per second. -1 means no throttle.

|`slices`
|`number` - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +
_Default:_ `1`

|`body`
|`object` - The search definition using the Query DSL

|===

=== deleteScript
[source,js]
----
client.deleteScript([params] [, options] [, callback])
----
link:{ref}/modules-scripting.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Script ID

|`lang`
|`string` - Script language

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|===

=== deleteTemplate
[source,js]
----
client.deleteTemplate([params] [, options] [, callback])
----
link:{ref}/search-template.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Template ID

|===

=== exists
[source,js]
----
client.exists([params] [, options] [, callback])
----
link:{ref}/docs-get.html[Reference]
[cols=2*]
|===
|`id`
|`string` - The document ID

|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document (use `_all` to fetch the first document matching the ID across all types)

|`stored_fields` or `storedFields`
|`string, string[]` - A comma-separated list of stored fields to return in the response

|`parent`
|`string` - The ID of the parent document

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`realtime`
|`boolean` - Specify whether to perform the operation in realtime or search mode

|`refresh`
|`boolean` - Refresh the shard containing the document before performing the operation

|`routing`
|`string` - Specific routing value

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|===

=== existsSource
[source,js]
----
client.existsSource([params] [, options] [, callback])
----
link:{ref}/docs-get.html[Reference]
[cols=2*]
|===
|`id`
|`string` - The document ID

|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document; use `_all` to fetch the first document matching the ID across all types

|`parent`
|`string` - The ID of the parent document

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`realtime`
|`boolean` - Specify whether to perform the operation in realtime or search mode

|`refresh`
|`boolean` - Refresh the shard containing the document before performing the operation

|`routing`
|`string` - Specific routing value

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|===

=== explain
[source,js]
----
client.explain([params] [, options] [, callback])
----
link:{ref}/search-explain.html[Reference]
[cols=2*]
|===
|`id`
|`string` - The document ID

|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document

|`analyze_wildcard` or `analyzeWildcard`
|`boolean` - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)

|`analyzer`
|`string` - The analyzer for the query string query

|`default_operator` or `defaultOperator`
|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
_Default:_ `OR`

|`df`
|`string` - The default field for query string query (default: _all)

|`stored_fields` or `storedFields`
|`string, string[]` - A comma-separated list of stored fields to return in the response

|`lenient`
|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

|`parent`
|`string` - The ID of the parent document

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`q`
|`string` - Query in the Lucene query string syntax

|`routing`
|`string` - Specific routing value

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`body`
|`object` - The query definition using the Query DSL

|===

=== fieldCaps
[source,js]
----
client.fieldCaps([params] [, options] [, callback])
----
link:{ref}/search-field-caps.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`fields`
|`string, string[]` - A comma-separated list of field names

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`body`
|`object` - Field json objects containing an array of field names

|===

=== fieldStats
[source,js]
----
client.fieldStats([params] [, options] [, callback])
----
link:{ref}/search-field-stats.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`fields`
|`string, string[]` - A comma-separated list of fields for to get field statistics for (min value, max value, and more)

|`level`
|`'indices', 'cluster'` - Defines if field stats should be returned on a per index level or on a cluster wide level +
_Default:_ `cluster`

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`body`
|`object` - Field json objects containing the name and optionally a range to filter out indices result, that have results outside the defined bounds

|===

=== get
[source,js]
----
client.get([params] [, options] [, callback])
----
link:{ref}/docs-get.html[Reference]
[cols=2*]
|===
|`id`
|`string` - The document ID

|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document (use `_all` to fetch the first document matching the ID across all types)

|`stored_fields` or `storedFields`
|`string, string[]` - A comma-separated list of stored fields to return in the response

|`parent`
|`string` - The ID of the parent document

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`realtime`
|`boolean` - Specify whether to perform the operation in realtime or search mode

|`refresh`
|`boolean` - Refresh the shard containing the document before performing the operation

|`routing`
|`string` - Specific routing value

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|===

=== getScript
[source,js]
----
client.getScript([params] [, options] [, callback])
----
link:{ref}/modules-scripting.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Script ID

|`lang`
|`string` - Script language

|===

=== getSource
[source,js]
----
client.getSource([params] [, options] [, callback])
----
link:{ref}/docs-get.html[Reference]
[cols=2*]
|===
|`id`
|`string` - The document ID

|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document; use `_all` to fetch the first document matching the ID across all types

|`parent`
|`string` - The ID of the parent document

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`realtime`
|`boolean` - Specify whether to perform the operation in realtime or search mode

|`refresh`
|`boolean` - Refresh the shard containing the document before performing the operation

|`routing`
|`string` - Specific routing value

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|===

=== getTemplate
[source,js]
----
client.getTemplate([params] [, options] [, callback])
----
link:{ref}/search-template.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Template ID

|===

=== index
[source,js]
----
client.index([params] [, options] [, callback])
----
link:{ref}/docs-index_.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Document ID

|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)

|`op_type` or `opType`
|`'index', 'create'` - Explicit operation type +
_Default:_ `index`

|`parent`
|`string` - ID of the parent document

|`refresh`
|`'true', 'false', 'wait_for'` - 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.

|`routing`
|`string` - Specific routing value

|`timeout`
|`string` - Explicit operation timeout

|`timestamp`
|`string` - Explicit timestamp for the document

|`ttl`
|`string` - Expiration time for the document

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|`pipeline`
|`string` - The pipeline id to preprocess incoming documents with

|`body`
|`object` - The document

|===

=== indices.analyze
[source,js]
----
client.indices.analyze([params] [, options] [, callback])
----
link:{ref}/indices-analyze.html[Reference]
[cols=2*]
|===
|`index`
|`string` - The name of the index to scope the operation

|`analyzer`
|`string` - The name of the analyzer to use

|`char_filter` or `charFilter`
|`string, string[]` - A comma-separated list of character filters to use for the analysis

|`field`
|`string` - Use the analyzer configured for this field (instead of passing the analyzer name)

|`filter`
|`string, string[]` - A comma-separated list of filters to use for the analysis

|`index`
|`string` - The name of the index to scope the operation

|`prefer_local` or `preferLocal`
|`boolean` - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)

|`text`
|`string, string[]` - The text on which the analysis should be performed (when request body is not used)

|`tokenizer`
|`string` - The name of the tokenizer to use for the analysis

|`explain`
|`boolean` - With `true`, outputs more advanced details. (default: false)

|`attributes`
|`string, string[]` - A comma-separated list of token attributes to output, this parameter works only with `explain=true`

|`format`
|`'detailed', 'text'` - Format of the output +
_Default:_ `detailed`

|`body`
|`object` - The text on which the analysis should be performed

|===

=== indices.clearCache
[source,js]
----
client.indices.clearCache([params] [, options] [, callback])
----
link:{ref}/indices-clearcache.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index name to limit the operation

|`field_data` or `fieldData`
|`boolean` - Clear field data

|`fielddata`
|`boolean` - Clear field data

|`fields`
|`string, string[]` - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)

|`query`
|`boolean` - Clear query caches

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`index`
|`string, string[]` - A comma-separated list of index name to limit the operation

|`recycler`
|`boolean` - Clear the recycler cache

|`request_cache` or `requestCache`
|`boolean` - Clear request cache

|`request`
|`boolean` - Clear request cache

|===

=== indices.close
[source,js]
----
client.indices.close([params] [, options] [, callback])
----
link:{ref}/indices-open-close.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma separated list of indices to close

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|===

=== indices.create
[source,js]
----
client.indices.create([params] [, options] [, callback])
----
link:{ref}/indices-create-index.html[Reference]
[cols=2*]
|===
|`index`
|`string` - The name of the index

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - Set the number of active shards to wait for before the operation returns.

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`update_all_types` or `updateAllTypes`
|`boolean` - Whether to update the mapping for all fields with the same name across all types or not

|`body`
|`object` - The configuration for the index (`settings` and `mappings`)

|===

=== indices.delete
[source,js]
----
client.indices.delete([params] [, options] [, callback])
----
link:{ref}/indices-delete-index.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|===

=== indices.deleteAlias
[source,js]
----
client.indices.deleteAlias([params] [, options] [, callback])
----
link:{ref}/indices-aliases.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names (supports wildcards); use `_all` for all indices

|`name`
|`string, string[]` - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.

|`timeout`
|`string` - Explicit timestamp for the document

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|===

=== indices.deleteTemplate
[source,js]
----
client.indices.deleteTemplate([params] [, options] [, callback])
----
link:{ref}/indices-templates.html[Reference]
[cols=2*]
|===
|`name`
|`string` - The name of the template

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|===

=== indices.exists
[source,js]
----
client.indices.exists([params] [, options] [, callback])
----
link:{ref}/indices-exists.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Ignore unavailable indexes (default: false)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Ignore if a wildcard expression resolves to no concrete indices (default: false)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) +
_Default:_ `open`

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`include_defaults` or `includeDefaults`
|`boolean` - Whether to return all default setting for each of the indices.

|===

=== indices.existsAlias
[source,js]
----
client.indices.existsAlias([params] [, options] [, callback])
----
link:{ref}/indices-aliases.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to filter aliases

|`name`
|`string, string[]` - A comma-separated list of alias names to return

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `all`

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|===

=== indices.existsTemplate
[source,js]
----
client.indices.existsTemplate([params] [, options] [, callback])
----
link:{ref}/indices-templates.html[Reference]
[cols=2*]
|===
|`name`
|`string, string[]` - The comma separated names of the index templates

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|===

=== indices.existsType
[source,js]
----
client.indices.existsType([params] [, options] [, callback])
----
link:{ref}/indices-types-exists.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` to check the types across all indices

|`type`
|`string, string[]` - A comma-separated list of document types to check

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|===

=== indices.flush
[source,js]
----
client.indices.flush([params] [, options] [, callback])
----
link:{ref}/indices-flush.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string for all indices

|`force`
|`boolean` - 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)

|`wait_if_ongoing` or `waitIfOngoing`
|`boolean` - 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.

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|===

=== indices.flushSynced
[source,js]
----
client.indices.flushSynced([params] [, options] [, callback])
----
link:{ref}/indices-synced-flush.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string for all indices

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|===

=== indices.forcemerge
[source,js]
----
client.indices.forcemerge([params] [, options] [, callback])
----
link:{ref}/indices-forcemerge.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`flush`
|`boolean` - Specify whether the index should be flushed after performing the operation (default: true)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`max_num_segments` or `maxNumSegments`
|`number` - The number of segments the index should be merged into (default: dynamic)

|`only_expunge_deletes` or `onlyExpungeDeletes`
|`boolean` - Specify whether the operation should only expunge deleted documents

|`operation_threading` or `operationThreading`
|`undefined` - TODO: ?

|`wait_for_merge` or `waitForMerge`
|`boolean` - Specify whether the request should block until the merge process is finished (default: true)

|===

=== indices.get
[source,js]
----
client.indices.get([params] [, options] [, callback])
----
link:{ref}/indices-get-index.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names

|`feature`
|`string, string[]` - A comma-separated list of features

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Ignore unavailable indexes (default: false)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Ignore if a wildcard expression resolves to no concrete indices (default: false)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) +
_Default:_ `open`

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`include_defaults` or `includeDefaults`
|`boolean` - Whether to return all default setting for each of the indices.

|===

=== indices.getAlias
[source,js]
----
client.indices.getAlias([params] [, options] [, callback])
----
link:{ref}/indices-aliases.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to filter aliases

|`name`
|`string, string[]` - A comma-separated list of alias names to return

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `all`

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|===

=== indices.getFieldMapping
[source,js]
----
client.indices.getFieldMapping([params] [, options] [, callback])
----
link:{ref}/indices-get-field-mapping.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names

|`type`
|`string, string[]` - A comma-separated list of document types

|`fields`
|`string, string[]` - A comma-separated list of fields

|`include_defaults` or `includeDefaults`
|`boolean` - Whether the default mapping values should be returned as well

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|===

=== indices.getMapping
[source,js]
----
client.indices.getMapping([params] [, options] [, callback])
----
link:{ref}/indices-get-mapping.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names

|`type`
|`string, string[]` - A comma-separated list of document types

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|===

=== indices.getSettings
[source,js]
----
client.indices.getSettings([params] [, options] [, callback])
----
link:{ref}/indices-get-settings.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`name`
|`string, string[]` - The name of the settings that should be included

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open,closed`

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`include_defaults` or `includeDefaults`
|`boolean` - Whether to return all default setting for each of the indices.

|===

=== indices.getTemplate
[source,js]
----
client.indices.getTemplate([params] [, options] [, callback])
----
link:{ref}/indices-templates.html[Reference]
[cols=2*]
|===
|`name`
|`string, string[]` - The comma separated names of the index templates

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|===

=== indices.getUpgrade
[source,js]
----
client.indices.getUpgrade([params] [, options] [, callback])
----
link:{ref}/indices-upgrade.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|===

=== indices.open
[source,js]
----
client.indices.open([params] [, options] [, callback])
----
link:{ref}/indices-open-close.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma separated list of indices to open

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `closed`

|===

=== indices.putAlias
[source,js]
----
client.indices.putAlias([params] [, options] [, callback])
----
link:{ref}/indices-aliases.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.

|`name`
|`string` - The name of the alias to be created or updated

|`timeout`
|`string` - Explicit timestamp for the document

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`body`
|`object` - The settings for the alias, such as `routing` or `filter`

|===

=== indices.putMapping
[source,js]
----
client.indices.putMapping([params] [, options] [, callback])
----
link:{ref}/indices-put-mapping.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - 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`
|`string` - The name of the document type

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`update_all_types` or `updateAllTypes`
|`boolean` - Whether to update the mapping for all fields with the same name across all types or not

|`body`
|`object` - The mapping definition

|===

=== indices.putSettings
[source,js]
----
client.indices.putSettings([params] [, options] [, callback])
----
link:{ref}/indices-update-settings.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`preserve_existing` or `preserveExisting`
|`boolean` - Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`body`
|`object` - The index settings to be updated

|===

=== indices.putTemplate
[source,js]
----
client.indices.putTemplate([params] [, options] [, callback])
----
link:{ref}/indices-templates.html[Reference]
[cols=2*]
|===
|`name`
|`string` - The name of the template

|`order`
|`number` - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)

|`create`
|`boolean` - Whether the index template should only be added if new or can also replace an existing one

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`body`
|`object` - The template definition

|===

=== indices.recovery
[source,js]
----
client.indices.recovery([params] [, options] [, callback])
----
link:{ref}/indices-recovery.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`detailed`
|`boolean` - Whether to display detailed information about shard recovery

|`active_only` or `activeOnly`
|`boolean` - Display only those recoveries that are currently on-going

|===

=== indices.refresh
[source,js]
----
client.indices.refresh([params] [, options] [, callback])
----
link:{ref}/indices-refresh.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|===

=== indices.rollover
[source,js]
----
client.indices.rollover([params] [, options] [, callback])
----
link:{ref}/indices-rollover-index.html[Reference]
[cols=2*]
|===
|`alias`
|`string` - The name of the alias to rollover

|`new_index` or `newIndex`
|`string` - The name of the rollover index

|`timeout`
|`string` - Explicit operation timeout

|`dry_run` or `dryRun`
|`boolean` - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - Set the number of active shards to wait for on the newly created rollover index before the operation returns.

|`body`
|`object` - The conditions that needs to be met for executing rollover

|===

=== indices.segments
[source,js]
----
client.indices.segments([params] [, options] [, callback])
----
link:{ref}/indices-segments.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`operation_threading` or `operationThreading`
|`undefined` - TODO: ?

|`verbose`
|`boolean` - Includes detailed memory usage by Lucene.

|===

=== indices.shardStores
[source,js]
----
client.indices.shardStores([params] [, options] [, callback])
----
link:{ref}/indices-shards-stores.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`status`
|`string, string[]` - A comma-separated list of statuses used to filter on shards to get store information for

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`operation_threading` or `operationThreading`
|`undefined` - TODO: ?

|===

=== indices.shrink
[source,js]
----
client.indices.shrink([params] [, options] [, callback])
----
link:{ref}/indices-shrink-index.html[Reference]
[cols=2*]
|===
|`index`
|`string` - The name of the source index to shrink

|`target`
|`string` - The name of the target index to shrink into

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - Set the number of active shards to wait for on the shrunken index before the operation returns.

|`body`
|`object` - The configuration for the target index (`settings` and `aliases`)

|===

=== indices.stats
[source,js]
----
client.indices.stats([params] [, options] [, callback])
----
link:{ref}/indices-stats.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`metric`
|`string, string[]` - Limit the information returned the specific metrics.

|`completion_fields` or `completionFields`
|`string, string[]` - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)

|`fielddata_fields` or `fielddataFields`
|`string, string[]` - A comma-separated list of fields for `fielddata` index metric (supports wildcards)

|`fields`
|`string, string[]` - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)

|`groups`
|`string, string[]` - A comma-separated list of search groups for `search` index metric

|`level`
|`'cluster', 'indices', 'shards'` - Return stats aggregated at cluster, index or shard level +
_Default:_ `indices`

|`types`
|`string, string[]` - A comma-separated list of document types for the `indexing` index metric

|`include_segment_file_sizes` or `includeSegmentFileSizes`
|`boolean` - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)

|===

=== indices.updateAliases
[source,js]
----
client.indices.updateAliases([params] [, options] [, callback])
----
link:{ref}/indices-aliases.html[Reference]
[cols=2*]
|===
|`timeout`
|`string` - Request timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`body`
|`object` - The definition of `actions` to perform

|===

=== indices.upgrade
[source,js]
----
client.indices.upgrade([params] [, options] [, callback])
----
link:{ref}/indices-upgrade.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`wait_for_completion` or `waitForCompletion`
|`boolean` - Specify whether the request should block until the all segments are upgraded (default: false)

|`only_ancient_segments` or `onlyAncientSegments`
|`boolean` - If true, only ancient (an older Lucene major release) segments will be upgraded

|===

=== indices.validateQuery
[source,js]
----
client.indices.validateQuery([params] [, options] [, callback])
----
link:{ref}/search-validate.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices

|`type`
|`string, string[]` - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types

|`explain`
|`boolean` - Return detailed information about the error

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`operation_threading` or `operationThreading`
|`undefined` - TODO: ?

|`q`
|`string` - Query in the Lucene query string syntax

|`analyzer`
|`string` - The analyzer to use for the query string

|`analyze_wildcard` or `analyzeWildcard`
|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)

|`default_operator` or `defaultOperator`
|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
_Default:_ `OR`

|`df`
|`string` - The field to use as default where no field prefix is given in the query string

|`lenient`
|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

|`rewrite`
|`boolean` - Provide a more detailed explanation showing the actual Lucene query that will be executed.

|`all_shards` or `allShards`
|`boolean` - Execute validation on all shards instead of one random shard per index

|`body`
|`object` - The query definition specified with the Query DSL

|===

=== info
[source,js]
----
client.info([params] [, options] [, callback])
----
link:https://www.elastic.co/guide/[Reference]


=== ingest.deletePipeline
[source,js]
----
client.ingest.deletePipeline([params] [, options] [, callback])
----
link:{ref}/delete-pipeline-api.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Pipeline ID

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`timeout`
|`string` - Explicit operation timeout

|===

=== ingest.getPipeline
[source,js]
----
client.ingest.getPipeline([params] [, options] [, callback])
----
link:{ref}/get-pipeline-api.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Comma separated list of pipeline ids. Wildcards supported

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|===

=== ingest.processorGrok
[source,js]
----
client.ingest.processorGrok([params] [, options] [, callback])
----
link:{ref}/grok-processor.html#grok-processor-rest-get[Reference]


=== ingest.putPipeline
[source,js]
----
client.ingest.putPipeline([params] [, options] [, callback])
----
link:{ref}/put-pipeline-api.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Pipeline ID

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`timeout`
|`string` - Explicit operation timeout

|`body`
|`object` - The ingest definition

|===

=== ingest.simulate
[source,js]
----
client.ingest.simulate([params] [, options] [, callback])
----
link:{ref}/simulate-pipeline-api.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Pipeline ID

|`verbose`
|`boolean` - Verbose mode. Display data output for each processor in executed pipeline

|`body`
|`object` - The simulate definition

|===

=== mget
[source,js]
----
client.mget([params] [, options] [, callback])
----
link:{ref}/docs-multi-get.html[Reference]
[cols=2*]
|===
|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document

|`stored_fields` or `storedFields`
|`string, string[]` - A comma-separated list of stored fields to return in the response

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`realtime`
|`boolean` - Specify whether to perform the operation in realtime or search mode

|`refresh`
|`boolean` - Refresh the shard containing the document before performing the operation

|`routing`
|`string` - Specific routing value

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`body`
|`object` - Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.

|===

=== mpercolate
[source,js]
----
client.mpercolate([params] [, options] [, callback])
----
link:{ref}/search-percolate.html[Reference]
[cols=2*]
|===
|`index`
|`string` - The index of the document being count percolated to use as default

|`type`
|`string` - The type of the document being percolated to use as default.

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`body`
|`object` - The percolate request definitions (header & body pair), separated by newlines

|===

=== msearch
[source,js]
----
client.msearch([params] [, options] [, callback])
----
link:{ref}/search-multi-search.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to use as default

|`type`
|`string, string[]` - A comma-separated list of document types to use as default

|`search_type` or `searchType`
|`'query_then_fetch', 'query_and_fetch', 'dfs_query_then_fetch', 'dfs_query_and_fetch'` - Search operation type

|`max_concurrent_searches` or `maxConcurrentSearches`
|`number` - Controls the maximum number of concurrent searches the multi search api will execute

|`typed_keys` or `typedKeys`
|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

|`pre_filter_shard_size` or `preFilterShardSize`
|`number` - 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. +
_Default:_ `128`

|`body`
|`object` - The request definitions (metadata-search request definition pairs), separated by newlines

|===

=== msearchTemplate
[source,js]
----
client.msearchTemplate([params] [, options] [, callback])
----
link:{ref}/search-template.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to use as default

|`type`
|`string, string[]` - A comma-separated list of document types to use as default

|`search_type` or `searchType`
|`'query_then_fetch', 'query_and_fetch', 'dfs_query_then_fetch', 'dfs_query_and_fetch'` - Search operation type

|`typed_keys` or `typedKeys`
|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

|`max_concurrent_searches` or `maxConcurrentSearches`
|`number` - Controls the maximum number of concurrent searches the multi search api will execute

|`body`
|`object` - The request definitions (metadata-search request definition pairs), separated by newlines

|===

=== mtermvectors
[source,js]
----
client.mtermvectors([params] [, options] [, callback])
----
link:{ref}/docs-multi-termvectors.html[Reference]
[cols=2*]
|===
|`index`
|`string` - The index in which the document resides.

|`type`
|`string` - The type of the document.

|`ids`
|`string, string[]` - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body

|`term_statistics` or `termStatistics`
|`boolean` - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".

|`field_statistics` or `fieldStatistics`
|`boolean` - 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". +
_Default:_ `true`

|`fields`
|`string, string[]` - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".

|`offsets`
|`boolean` - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +
_Default:_ `true`

|`positions`
|`boolean` - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +
_Default:_ `true`

|`payloads`
|`boolean` - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +
_Default:_ `true`

|`preference`
|`string` - 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`
|`string` - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".

|`parent`
|`string` - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".

|`realtime`
|`boolean` - Specifies if requests are real-time as opposed to near-real-time (default: true).

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|`body`
|`object` - Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.

|===

=== nodes.hotThreads
[source,js]
----
client.nodes.hotThreads([params] [, options] [, callback])
----
link:{ref}/cluster-nodes-hot-threads.html[Reference]
[cols=2*]
|===
|`node_id` or `nodeId`
|`string, string[]` - 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

|`interval`
|`string` - The interval for the second sampling of threads

|`snapshots`
|`number` - Number of samples of thread stacktrace (default: 10)

|`threads`
|`number` - Specify the number of threads to provide information for (default: 3)

|`ignore_idle_threads` or `ignoreIdleThreads`
|`boolean` - 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`
|`'cpu', 'wait', 'block'` - The type to sample (default: cpu)

|`timeout`
|`string` - Explicit operation timeout

|===

=== nodes.info
[source,js]
----
client.nodes.info([params] [, options] [, callback])
----
link:{ref}/cluster-nodes-info.html[Reference]
[cols=2*]
|===
|`node_id` or `nodeId`
|`string, string[]` - 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`
|`string, string[]` - A comma-separated list of metrics you wish returned. Leave empty to return all.

|`flat_settings` or `flatSettings`
|`boolean` - Return settings in flat format (default: false)

|`timeout`
|`string` - Explicit operation timeout

|===

=== nodes.stats
[source,js]
----
client.nodes.stats([params] [, options] [, callback])
----
link:{ref}/cluster-nodes-stats.html[Reference]
[cols=2*]
|===
|`metric`
|`string, string[]` - Limit the information returned to the specified metrics

|`index_metric` or `indexMetric`
|`string, string[]` - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.

|`node_id` or `nodeId`
|`string, string[]` - 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

|`completion_fields` or `completionFields`
|`string, string[]` - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)

|`fielddata_fields` or `fielddataFields`
|`string, string[]` - A comma-separated list of fields for `fielddata` index metric (supports wildcards)

|`fields`
|`string, string[]` - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)

|`groups`
|`boolean` - A comma-separated list of search groups for `search` index metric

|`level`
|`'indices', 'node', 'shards'` - Return indices stats aggregated at index, node or shard level +
_Default:_ `node`

|`types`
|`string, string[]` - A comma-separated list of document types for the `indexing` index metric

|`timeout`
|`string` - Explicit operation timeout

|`include_segment_file_sizes` or `includeSegmentFileSizes`
|`boolean` - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)

|===

=== percolate
[source,js]
----
client.percolate([params] [, options] [, callback])
----
link:{ref}/search-percolate.html[Reference]
[cols=2*]
|===
|`index`
|`string` - The index of the document being percolated.

|`type`
|`string` - The type of the document being percolated.

|`id`
|`string` - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.

|`routing`
|`string, string[]` - A comma-separated list of specific routing values

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`percolate_index` or `percolateIndex`
|`string` - The index to percolate the document into. Defaults to index.

|`percolate_type` or `percolateType`
|`string` - The type to percolate document into. Defaults to type.

|`percolate_routing` or `percolateRouting`
|`string` - The routing value to use when percolating the existing document.

|`percolate_preference` or `percolatePreference`
|`string` - Which shard to prefer when executing the percolate request.

|`percolate_format` or `percolateFormat`
|`'ids'` - Return an array of matching query IDs instead of objects

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|`body`
|`object` - The percolator request definition using the percolate DSL

|===

=== ping
[source,js]
----
client.ping([params] [, options] [, callback])
----
link:https://www.elastic.co/guide/[Reference]


=== putScript
[source,js]
----
client.putScript([params] [, options] [, callback])
----
link:{ref}/modules-scripting.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Script ID

|`lang`
|`string` - Script language

|`timeout`
|`string` - Explicit operation timeout

|`master_timeout` or `masterTimeout`
|`string` - Specify timeout for connection to master

|`body`
|`object` - The document

|===

=== putTemplate
[source,js]
----
client.putTemplate([params] [, options] [, callback])
----
link:{ref}/search-template.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Template ID

|`body`
|`object` - The document

|===

=== reindex
[source,js]
----
client.reindex([params] [, options] [, callback])
----
link:{ref}/docs-reindex.html[Reference]
[cols=2*]
|===
|`refresh`
|`boolean` - Should the effected indexes be refreshed?

|`timeout`
|`string` - Time each individual bulk request should wait for shards that are unavailable. +
_Default:_ `1m`

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - 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)

|`wait_for_completion` or `waitForCompletion`
|`boolean` - Should the request should block until the reindex is complete. +
_Default:_ `true`

|`requests_per_second` or `requestsPerSecond`
|`number` - The throttle to set on this request in sub-requests per second. -1 means no throttle.

|`slices`
|`number` - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +
_Default:_ `1`

|`body`
|`object` - The search definition using the Query DSL and the prototype for the index request.

|===

=== reindexRethrottle
[source,js]
----
client.reindexRethrottle([params] [, options] [, callback])
----
link:{ref}/docs-reindex.html[Reference]
[cols=2*]
|===
|`task_id` or `taskId`
|`string` - The task id to rethrottle

|`requests_per_second` or `requestsPerSecond`
|`number` - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.

|===

=== renderSearchTemplate
[source,js]
----
client.renderSearchTemplate([params] [, options] [, callback])
----
link:{ref}/search-template.html[Reference]
[cols=2*]
|===
|`id`
|`string` - The id of the stored search template

|`body`
|`object` - The search definition template and its params

|===

=== scroll
[source,js]
----
client.scroll([params] [, options] [, callback])
----
link:{ref}/search-request-scroll.html[Reference]
[cols=2*]
|===
|`scroll_id` or `scrollId`
|`string` - The scroll ID

|`scroll`
|`string` - Specify how long a consistent view of the index should be maintained for scrolled search

|`scroll_id` or `scrollId`
|`string` - The scroll ID for scrolled search

|`body`
|`object` - The scroll ID if not passed by URL or query parameter.

|===

=== search
[source,js]
----
client.search([params] [, options] [, callback])
----
link:{ref}/search-search.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices

|`type`
|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types

|`analyzer`
|`string` - The analyzer to use for the query string

|`analyze_wildcard` or `analyzeWildcard`
|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)

|`default_operator` or `defaultOperator`
|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
_Default:_ `OR`

|`df`
|`string` - The field to use as default where no field prefix is given in the query string

|`explain`
|`boolean` - Specify whether to return detailed information about score computation as part of a hit

|`stored_fields` or `storedFields`
|`string, string[]` - A comma-separated list of stored fields to return as part of a hit

|`docvalue_fields` or `docvalueFields`
|`string, string[]` - A comma-separated list of fields to return as the docvalue representation of a field for each hit

|`fielddata_fields` or `fielddataFields`
|`string, string[]` - A comma-separated list of fields to return as the docvalue representation of a field for each hit

|`from`
|`number` - Starting offset (default: 0)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`lenient`
|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`q`
|`string` - Query in the Lucene query string syntax

|`routing`
|`string, string[]` - A comma-separated list of specific routing values

|`scroll`
|`string` - Specify how long a consistent view of the index should be maintained for scrolled search

|`search_type` or `searchType`
|`'query_then_fetch', 'dfs_query_then_fetch'` - Search operation type

|`size`
|`number` - Number of hits to return (default: 10)

|`sort`
|`string, string[]` - A comma-separated list of <field>:<direction> pairs

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`terminate_after` or `terminateAfter`
|`number` - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.

|`stats`
|`string, string[]` - Specific 'tag' of the request for logging and statistical purposes

|`suggest_field` or `suggestField`
|`string` - Specify which field to use for suggestions

|`suggest_mode` or `suggestMode`
|`'missing', 'popular', 'always'` - Specify suggest mode +
_Default:_ `missing`

|`suggest_size` or `suggestSize`
|`number` - How many suggestions to return in response

|`suggest_text` or `suggestText`
|`string` - The source text for which the suggestions should be returned

|`timeout`
|`string` - Explicit operation timeout

|`track_scores` or `trackScores`
|`boolean` - Whether to calculate and return scores even if they are not used for sorting

|`typed_keys` or `typedKeys`
|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

|`version`
|`boolean` - Specify whether to return document version as part of a hit

|`request_cache` or `requestCache`
|`boolean` - Specify if request cache should be used for this request or not, defaults to index level setting

|`batched_reduce_size` or `batchedReduceSize`
|`number` - 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. +
_Default:_ `512`

|`max_concurrent_shard_requests` or `maxConcurrentShardRequests`
|`number` - 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 +
_Default:_ `The default grows with the number of nodes in the cluster but is at most 256.`

|`pre_filter_shard_size` or `preFilterShardSize`
|`number` - 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. +
_Default:_ `128`

|`body`
|`object` - The search definition using the Query DSL

|===

=== searchShards
[source,js]
----
client.searchShards([params] [, options] [, callback])
----
link:{ref}/search-shards.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices

|`type`
|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`routing`
|`string` - Specific routing value

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|===

=== searchTemplate
[source,js]
----
client.searchTemplate([params] [, options] [, callback])
----
link:{ref}/search-template.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices

|`type`
|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`routing`
|`string, string[]` - A comma-separated list of specific routing values

|`scroll`
|`string` - Specify how long a consistent view of the index should be maintained for scrolled search

|`search_type` or `searchType`
|`'query_then_fetch', 'query_and_fetch', 'dfs_query_then_fetch', 'dfs_query_and_fetch'` - Search operation type

|`explain`
|`boolean` - Specify whether to return detailed information about score computation as part of a hit

|`profile`
|`boolean` - Specify whether to profile the query execution

|`typed_keys` or `typedKeys`
|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response

|`body`
|`object` - The search definition template and its params

|===

=== snapshot.create
[source,js]
----
client.snapshot.create([params] [, options] [, callback])
----
link:{ref}/modules-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string` - A repository name

|`snapshot`
|`string` - A snapshot name

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`wait_for_completion` or `waitForCompletion`
|`boolean` - Should this request wait until the operation has completed before returning

|`body`
|`object` - The snapshot definition

|===

=== snapshot.createRepository
[source,js]
----
client.snapshot.createRepository([params] [, options] [, callback])
----
link:{ref}/modules-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string` - A repository name

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`timeout`
|`string` - Explicit operation timeout

|`verify`
|`boolean` - Whether to verify the repository after creation

|`body`
|`object` - The repository definition

|===

=== snapshot.delete
[source,js]
----
client.snapshot.delete([params] [, options] [, callback])
----
link:{ref}/modules-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string` - A repository name

|`snapshot`
|`string` - A snapshot name

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|===

=== snapshot.deleteRepository
[source,js]
----
client.snapshot.deleteRepository([params] [, options] [, callback])
----
link:{ref}/modules-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string, string[]` - A comma-separated list of repository names

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`timeout`
|`string` - Explicit operation timeout

|===

=== snapshot.get
[source,js]
----
client.snapshot.get([params] [, options] [, callback])
----
link:{ref}/modules-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string` - A repository name

|`snapshot`
|`string, string[]` - A comma-separated list of snapshot names

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown

|`verbose`
|`boolean` - Whether to show verbose snapshot info or only show the basic info found in the repository index blob

|===

=== snapshot.getRepository
[source,js]
----
client.snapshot.getRepository([params] [, options] [, callback])
----
link:{ref}/modules-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string, string[]` - A comma-separated list of repository names

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)

|===

=== snapshot.restore
[source,js]
----
client.snapshot.restore([params] [, options] [, callback])
----
link:{ref}/modules-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string` - A repository name

|`snapshot`
|`string` - A snapshot name

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`wait_for_completion` or `waitForCompletion`
|`boolean` - Should this request wait until the operation has completed before returning

|`body`
|`object` - Details of what to restore

|===

=== snapshot.status
[source,js]
----
client.snapshot.status([params] [, options] [, callback])
----
link:{ref}/modules-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string` - A repository name

|`snapshot`
|`string, string[]` - A comma-separated list of snapshot names

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown

|===

=== snapshot.verifyRepository
[source,js]
----
client.snapshot.verifyRepository([params] [, options] [, callback])
----
link:{ref}/modules-snapshots.html[Reference]
[cols=2*]
|===
|`repository`
|`string` - A repository name

|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node

|`timeout`
|`string` - Explicit operation timeout

|===

=== suggest
[source,js]
----
client.suggest([params] [, options] [, callback])
----
link:{ref}/search-suggesters.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`routing`
|`string` - Specific routing value

|`body`
|`object` - The request definition

|===

=== tasks.cancel
[source,js]
----
client.tasks.cancel([params] [, options] [, callback])
----
link:{ref}/tasks.html[Reference]
[cols=2*]
|===
|`task_id` or `taskId`
|`string` - Cancel the task with specified task id (node_id:task_number)

|`nodes`
|`string, string[]` - 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`
|`string, string[]` - A comma-separated list of actions that should be cancelled. Leave empty to cancel all.

|`parent_node` or `parentNode`
|`string` - Cancel tasks with specified parent node.

|`parent_task_id` or `parentTaskId`
|`string` - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.

|===

=== tasks.get
[source,js]
----
client.tasks.get([params] [, options] [, callback])
----
link:{ref}/tasks.html[Reference]
[cols=2*]
|===
|`task_id` or `taskId`
|`string` - Return the task with specified id (node_id:task_number)

|`wait_for_completion` or `waitForCompletion`
|`boolean` - Wait for the matching tasks to complete (default: false)

|===

=== tasks.list
[source,js]
----
client.tasks.list([params] [, options] [, callback])
----
link:{ref}/tasks.html[Reference]
[cols=2*]
|===
|`nodes`
|`string, string[]` - 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`
|`string, string[]` - A comma-separated list of actions that should be returned. Leave empty to return all.

|`detailed`
|`boolean` - Return detailed task information (default: false)

|`parent_node` or `parentNode`
|`string` - Return tasks with specified parent node.

|`parent_task_id` or `parentTaskId`
|`string` - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.

|`wait_for_completion` or `waitForCompletion`
|`boolean` - Wait for the matching tasks to complete (default: false)

|`group_by` or `groupBy`
|`'nodes', 'parents'` - Group tasks by nodes or parent/child relationships +
_Default:_ `nodes`

|===

=== termvectors
[source,js]
----
client.termvectors([params] [, options] [, callback])
----
link:{ref}/docs-termvectors.html[Reference]
[cols=2*]
|===
|`index`
|`string` - The index in which the document resides.

|`type`
|`string` - The type of the document.

|`id`
|`string` - The id of the document, when not specified a doc param should be supplied.

|`term_statistics` or `termStatistics`
|`boolean` - Specifies if total term frequency and document frequency should be returned.

|`field_statistics` or `fieldStatistics`
|`boolean` - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. +
_Default:_ `true`

|`fields`
|`string, string[]` - A comma-separated list of fields to return.

|`offsets`
|`boolean` - Specifies if term offsets should be returned. +
_Default:_ `true`

|`positions`
|`boolean` - Specifies if term positions should be returned. +
_Default:_ `true`

|`payloads`
|`boolean` - Specifies if term payloads should be returned. +
_Default:_ `true`

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random).

|`routing`
|`string` - Specific routing value.

|`parent`
|`string` - Parent id of documents.

|`realtime`
|`boolean` - Specifies if request is real-time as opposed to near-real-time (default: true).

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'external', 'external_gte', 'force'` - Specific version type

|`body`
|`object` - Define parameters and or supply a document to get termvectors for. See documentation.

|===

=== update
[source,js]
----
client.update([params] [, options] [, callback])
----
link:{ref}/docs-update.html[Reference]
[cols=2*]
|===
|`id`
|`string` - Document ID

|`index`
|`string` - The name of the index

|`type`
|`string` - The type of the document

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - 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`
|`string, string[]` - A comma-separated list of fields to return in the response

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`lang`
|`string` - The script language (default: painless)

|`parent`
|`string` - ID of the parent document. Is is only used for routing and when for the upsert request

|`refresh`
|`'true', 'false', 'wait_for'` - 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.

|`retry_on_conflict` or `retryOnConflict`
|`number` - Specify how many times should the operation be retried when a conflict occurs (default: 0)

|`routing`
|`string` - Specific routing value

|`timeout`
|`string` - Explicit operation timeout

|`timestamp`
|`string` - Explicit timestamp for the document

|`ttl`
|`string` - Expiration time for the document

|`version`
|`number` - Explicit version number for concurrency control

|`version_type` or `versionType`
|`'internal', 'force'` - Specific version type

|`body`
|`object` - The request definition using either `script` or partial `doc`

|===

=== updateByQuery
[source,js]
----
client.updateByQuery([params] [, options] [, callback])
----
link:{ref}/docs-update-by-query.html[Reference]
[cols=2*]
|===
|`index`
|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices

|`type`
|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types

|`analyzer`
|`string` - The analyzer to use for the query string

|`analyze_wildcard` or `analyzeWildcard`
|`boolean` - Specify whether wildcard and prefix queries should be analyzed (default: false)

|`default_operator` or `defaultOperator`
|`'AND', 'OR'` - The default operator for query string query (AND or OR) +
_Default:_ `OR`

|`df`
|`string` - The field to use as default where no field prefix is given in the query string

|`from`
|`number` - Starting offset (default: 0)

|`ignore_unavailable` or `ignoreUnavailable`
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)

|`allow_no_indices` or `allowNoIndices`
|`boolean` - 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', 'proceed'` - What to do when the update by query hits version conflicts? +
_Default:_ `abort`

|`expand_wildcards` or `expandWildcards`
|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open`

|`lenient`
|`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

|`pipeline`
|`string` - Ingest pipeline to set on index requests made by this action. (default: none)

|`preference`
|`string` - Specify the node or shard the operation should be performed on (default: random)

|`q`
|`string` - Query in the Lucene query string syntax

|`routing`
|`string, string[]` - A comma-separated list of specific routing values

|`scroll`
|`string` - Specify how long a consistent view of the index should be maintained for scrolled search

|`search_type` or `searchType`
|`'query_then_fetch', 'dfs_query_then_fetch'` - Search operation type

|`search_timeout` or `searchTimeout`
|`string` - Explicit timeout for each search request. Defaults to no timeout.

|`size`
|`number` - Number of hits to return (default: 10)

|`sort`
|`string, string[]` - A comma-separated list of <field>:<direction> pairs

|`_source`
|`string, string[]` - True or false to return the _source field or not, or a list of fields to return

|`_source_exclude` or `_sourceExclude`
|`string, string[]` - A list of fields to exclude from the returned _source field

|`_source_include` or `_sourceInclude`
|`string, string[]` - A list of fields to extract and return from the _source field

|`terminate_after` or `terminateAfter`
|`number` - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.

|`stats`
|`string, string[]` - Specific 'tag' of the request for logging and statistical purposes

|`version`
|`boolean` - Specify whether to return document version as part of a hit

|`version_type` or `versionType`
|`boolean` - Should the document increment the version number (internal) on hit or not (reindex)

|`request_cache` or `requestCache`
|`boolean` - Specify if request cache should be used for this request or not, defaults to index level setting

|`refresh`
|`boolean` - Should the effected indexes be refreshed?

|`timeout`
|`string` - Time each individual bulk request should wait for shards that are unavailable. +
_Default:_ `1m`

|`wait_for_active_shards` or `waitForActiveShards`
|`string` - 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)

|`scroll_size` or `scrollSize`
|`number` - Size on the scroll request powering the update_by_query

|`wait_for_completion` or `waitForCompletion`
|`boolean` - Should the request should block until the update by query operation is complete. +
_Default:_ `true`

|`requests_per_second` or `requestsPerSecond`
|`number` - The throttle to set on this request in sub-requests per second. -1 means no throttle.

|`slices`
|`number` - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. +
_Default:_ `1`

|`body`
|`object` - The search definition using the Query DSL

|===
