|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
[[api-reference]]
|
|
|
|
|
== 5.3 API
|
|
|
|
|
== 5.4 API
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NOTE: This is currently the default API, but in upcoming versions that will change. We recommend setting the `apiVersion` config param when you instantiate your client to make sure that the API does not change unexpectedly.
|
|
|
|
|
@ -620,6 +620,8 @@ client.exists({
|
|
|
|
|
*Params*
|
|
|
|
|
|
|
|
|
|
[horizontal]
|
|
|
|
|
`storedFields`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of stored fields to return in the response
|
|
|
|
|
`parent`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- The ID of the parent document
|
|
|
|
|
`preference`::
|
|
|
|
|
@ -630,6 +632,22 @@ client.exists({
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Refresh the shard containing the document before performing the operation
|
|
|
|
|
`routing`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- Specific routing value
|
|
|
|
|
`_source`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- True or false to return the _source field or not, or a list of fields to return
|
|
|
|
|
`_sourceExclude`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A list of fields to exclude from the returned _source field
|
|
|
|
|
`_sourceInclude`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A list of fields to extract and return from the _source field
|
|
|
|
|
`version`::
|
|
|
|
|
<<api-param-type-number,`Number`>> -- Explicit version number for concurrency control
|
|
|
|
|
`versionType`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- Specific version type
|
|
|
|
|
Options:::
|
|
|
|
|
* `"internal"`
|
|
|
|
|
* `"external"`
|
|
|
|
|
* `"external_gte"`
|
|
|
|
|
* `"force"`
|
|
|
|
|
|
|
|
|
|
`id`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- The document ID
|
|
|
|
|
`index`::
|
|
|
|
|
@ -641,6 +659,61 @@ client.exists({
|
|
|
|
|
|
|
|
|
|
link:#[back to top]
|
|
|
|
|
|
|
|
|
|
[[api-existssource]]
|
|
|
|
|
=== `existsSource`
|
|
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
|
--------
|
|
|
|
|
client.existsSource([params, [callback]])
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
// no description
|
|
|
|
|
|
|
|
|
|
Check the *<<api-conventions>>* and http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html[the elasticsearch docs] for more information pertaining to this method.
|
|
|
|
|
|
|
|
|
|
// no examples
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*Params*
|
|
|
|
|
|
|
|
|
|
[horizontal]
|
|
|
|
|
`parent`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- The ID of the parent document
|
|
|
|
|
`preference`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- Specify the node or shard the operation should be performed on (default: random)
|
|
|
|
|
`realtime`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify whether to perform the operation in realtime or search mode
|
|
|
|
|
`refresh`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Refresh the shard containing the document before performing the operation
|
|
|
|
|
`routing`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- Specific routing value
|
|
|
|
|
`_source`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- True or false to return the _source field or not, or a list of fields to return
|
|
|
|
|
`_sourceExclude`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A list of fields to exclude from the returned _source field
|
|
|
|
|
`_sourceInclude`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A list of fields to extract and return from the _source field
|
|
|
|
|
`version`::
|
|
|
|
|
<<api-param-type-number,`Number`>> -- Explicit version number for concurrency control
|
|
|
|
|
`versionType`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- Specific version type
|
|
|
|
|
Options:::
|
|
|
|
|
* `"internal"`
|
|
|
|
|
* `"external"`
|
|
|
|
|
* `"external_gte"`
|
|
|
|
|
* `"force"`
|
|
|
|
|
|
|
|
|
|
`id`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- The document ID
|
|
|
|
|
`index`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- The name of the index
|
|
|
|
|
`type`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- The type of the document; use `_all` to fetch the first document matching the ID across all types
|
|
|
|
|
`body`::
|
|
|
|
|
<<api-param-type-object,`Object`>>, <<api-param-type-json,`JSON`>> -- An optional request body, as either JSON or a JSON serializable object. See http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html[the elasticsearch docs] for details about what can be specified here.
|
|
|
|
|
|
|
|
|
|
link:#[back to top]
|
|
|
|
|
|
|
|
|
|
[[api-explain]]
|
|
|
|
|
=== `explain`
|
|
|
|
|
|
|
|
|
|
@ -731,6 +804,45 @@ Options:::
|
|
|
|
|
|
|
|
|
|
link:#[back to top]
|
|
|
|
|
|
|
|
|
|
[[api-fieldcaps]]
|
|
|
|
|
=== `fieldCaps`
|
|
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
|
--------
|
|
|
|
|
client.fieldCaps([params, [callback]])
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
// no description
|
|
|
|
|
|
|
|
|
|
Check the *<<api-conventions>>* and http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html[the elasticsearch docs] for more information pertaining to this method.
|
|
|
|
|
|
|
|
|
|
// no examples
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*Params*
|
|
|
|
|
|
|
|
|
|
[horizontal]
|
|
|
|
|
`fields`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of field names
|
|
|
|
|
`ignoreUnavailable`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
|
|
|
`allowNoIndices`::
|
|
|
|
|
<<api-param-type-boolean,`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)
|
|
|
|
|
`[expandWildcards=open]`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
|
|
|
Options:::
|
|
|
|
|
* `"open"`
|
|
|
|
|
* `"closed"`
|
|
|
|
|
* `"none"`
|
|
|
|
|
* `"all"`
|
|
|
|
|
|
|
|
|
|
`index`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
|
|
|
|
`body`::
|
|
|
|
|
<<api-param-type-object,`Object`>>, <<api-param-type-json,`JSON`>> -- An optional request body, as either JSON or a JSON serializable object. See http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html[the elasticsearch docs] for details about what can be specified here.
|
|
|
|
|
|
|
|
|
|
link:#[back to top]
|
|
|
|
|
|
|
|
|
|
[[api-fieldstats]]
|
|
|
|
|
=== `fieldStats`
|
|
|
|
|
|
|
|
|
|
@ -1199,6 +1311,8 @@ Options:::
|
|
|
|
|
|
|
|
|
|
`maxConcurrentSearches`::
|
|
|
|
|
<<api-param-type-number,`Number`>> -- Controls the maximum number of concurrent searches the multi search api will execute
|
|
|
|
|
`typedKeys`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
|
|
|
|
`index`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of index names to use as default
|
|
|
|
|
`type`::
|
|
|
|
|
@ -1234,6 +1348,8 @@ Options:::
|
|
|
|
|
* `"dfs_query_then_fetch"`
|
|
|
|
|
* `"dfs_query_and_fetch"`
|
|
|
|
|
|
|
|
|
|
`typedKeys`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
|
|
|
|
`index`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of index names to use as default
|
|
|
|
|
`type`::
|
|
|
|
|
@ -1789,10 +1905,14 @@ Options:::
|
|
|
|
|
<<api-param-type-duration-string,`DurationString`>> -- Explicit operation timeout
|
|
|
|
|
`trackScores`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Whether to calculate and return scores even if they are not used for sorting
|
|
|
|
|
`typedKeys`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
|
|
|
|
`version`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify whether to return document version as part of a hit
|
|
|
|
|
`requestCache`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify if request cache should be used for this request or not, defaults to index level setting
|
|
|
|
|
`[batchedReduceSize=512]`::
|
|
|
|
|
<<api-param-type-number,`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.
|
|
|
|
|
`index`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
|
|
|
|
`type`::
|
|
|
|
|
@ -1895,6 +2015,8 @@ Options:::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify whether to return detailed information about score computation as part of a hit
|
|
|
|
|
`profile`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify whether to profile the query execution
|
|
|
|
|
`typedKeys`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
|
|
|
|
`index`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
|
|
|
|
`type`::
|
|
|
|
|
@ -3443,6 +3565,8 @@ Options:::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of index name to limit the operation
|
|
|
|
|
`recycler`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Clear the recycler cache
|
|
|
|
|
`requestCache`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Clear request cache
|
|
|
|
|
`request`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Clear request cache
|
|
|
|
|
`body`::
|
|
|
|
|
@ -3624,7 +3748,7 @@ client.indices.exists([params, [callback]])
|
|
|
|
|
|
|
|
|
|
Return a boolean indicating whether given index exists.
|
|
|
|
|
|
|
|
|
|
Check the *<<api-conventions>>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-exists.html[the elasticsearch docs] for more information pertaining to this method.
|
|
|
|
|
Check the *<<api-conventions>>* and http://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-exists.html[the elasticsearch docs] for more information pertaining to this method.
|
|
|
|
|
|
|
|
|
|
// no examples
|
|
|
|
|
|
|
|
|
|
@ -3632,24 +3756,28 @@ Check the *<<api-conventions>>* and https://www.elastic.co/guide/en/elasticsearc
|
|
|
|
|
*Params*
|
|
|
|
|
|
|
|
|
|
[horizontal]
|
|
|
|
|
`local`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Return local information, do not retrieve the state from master node (default: false)
|
|
|
|
|
`ignoreUnavailable`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Ignore unavailable indexes (default: false)
|
|
|
|
|
`allowNoIndices`::
|
|
|
|
|
<<api-param-type-boolean,`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)
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Ignore if a wildcard expression resolves to no concrete indices (default: false)
|
|
|
|
|
`[expandWildcards=open]`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
|
|
|
<<api-param-type-string,`String`>> -- Whether wildcard expressions should get expanded to open or closed indices (default: open)
|
|
|
|
|
Options:::
|
|
|
|
|
* `"open"`
|
|
|
|
|
* `"closed"`
|
|
|
|
|
* `"none"`
|
|
|
|
|
* `"all"`
|
|
|
|
|
|
|
|
|
|
`local`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Return local information, do not retrieve the state from master node (default: false)
|
|
|
|
|
`flatSettings`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Return settings in flat format (default: false)
|
|
|
|
|
`includeDefaults`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Whether to return all default setting for each of the indices.
|
|
|
|
|
`index`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of indices to check
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of index names
|
|
|
|
|
`body`::
|
|
|
|
|
<<api-param-type-object,`Object`>>, <<api-param-type-json,`JSON`>> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-exists.html[the elasticsearch docs] for details about what can be specified here.
|
|
|
|
|
<<api-param-type-object,`Object`>>, <<api-param-type-json,`JSON`>> -- An optional request body, as either JSON or a JSON serializable object. See http://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-exists.html[the elasticsearch docs] for details about what can be specified here.
|
|
|
|
|
|
|
|
|
|
link:#[back to top]
|
|
|
|
|
|
|
|
|
|
@ -3675,7 +3803,7 @@ Check the *<<api-conventions>>* and https://www.elastic.co/guide/en/elasticsearc
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
|
|
|
`allowNoIndices`::
|
|
|
|
|
<<api-param-type-boolean,`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)
|
|
|
|
|
`[expandWildcards=open,closed]`::
|
|
|
|
|
`[expandWildcards=all]`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
|
|
|
Options:::
|
|
|
|
|
* `"open"`
|
|
|
|
|
@ -3712,12 +3840,14 @@ Check the *<<api-conventions>>* and https://www.elastic.co/guide/en/elasticsearc
|
|
|
|
|
*Params*
|
|
|
|
|
|
|
|
|
|
[horizontal]
|
|
|
|
|
`flatSettings`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Return settings in flat format (default: false)
|
|
|
|
|
`masterTimeout`::
|
|
|
|
|
<<api-param-type-duration-string,`DurationString`>> -- Explicit operation timeout for connection to master node
|
|
|
|
|
`local`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Return local information, do not retrieve the state from master node (default: false)
|
|
|
|
|
`name`::
|
|
|
|
|
<<api-param-type-string,`String`>> -- The name of the template
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- The comma separated names of the index templates
|
|
|
|
|
`body`::
|
|
|
|
|
<<api-param-type-object,`Object`>>, <<api-param-type-json,`JSON`>> -- An optional request body, as either JSON or a JSON serializable object. See https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html[the elasticsearch docs] for details about what can be specified here.
|
|
|
|
|
|
|
|
|
|
@ -4746,6 +4876,8 @@ Options:::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
|
|
|
|
`rewrite`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Provide a more detailed explanation showing the actual Lucene query that will be executed.
|
|
|
|
|
`allShards`::
|
|
|
|
|
<<api-param-type-boolean,`Boolean`>> -- Execute validation on all shards instead of one random shard per index
|
|
|
|
|
`index`::
|
|
|
|
|
<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>> -- A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
|
|
|
|
|
`type`::
|
|
|
|
|
@ -4982,6 +5114,22 @@ Options:::
|
|
|
|
|
|
|
|
|
|
link:#[back to top]
|
|
|
|
|
|
|
|
|
|
[[api-remote-info]]
|
|
|
|
|
=== `remote.info`
|
|
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
|
--------
|
|
|
|
|
client.remote.info([params, [callback]])
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
// no description
|
|
|
|
|
|
|
|
|
|
Check the *<<api-conventions>>* and http://www.elastic.co/guide/en/elasticsearch/reference/master/remote-info.html[the elasticsearch docs] for more information pertaining to this method.
|
|
|
|
|
|
|
|
|
|
// no examples
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[api-snapshot-create]]
|
|
|
|
|
=== `snapshot.create`
|
|
|
|
|
|
|
|
|
|
|