From 3f0bc01eaedb3f5998c4027d611335c56bc7eb01 Mon Sep 17 00:00:00 2001 From: spalger Date: Fri, 30 Oct 2015 17:55:13 -0500 Subject: [PATCH] [apis] regenerate --- docs/api_methods.asciidoc | 696 +++++--------- ..._2_0.asciidoc => api_methods_1_7.asciidoc} | 906 +++++++++++------- docs/configuration.asciidoc | 2 +- docs/index.asciidoc | 4 +- src/lib/apis/browser_index.js | 2 +- src/lib/apis/index.js | 2 +- src/lib/apis/master.js | 82 +- 7 files changed, 814 insertions(+), 880 deletions(-) rename docs/{api_methods_2_0.asciidoc => api_methods_1_7.asciidoc} (87%) diff --git a/docs/api_methods.asciidoc b/docs/api_methods.asciidoc index 8da55864f..ae3c096c2 100644 --- a/docs/api_methods.asciidoc +++ b/docs/api_methods.asciidoc @@ -1,5 +1,5 @@ [[api-reference]] -== 1.7 API +== 2.0 API NOTE: This is currently the default API, but in upcoming versions that will change. We recommend setting the `apiVersion` config param when you instantiate your client to make sure that the API does not change unexpectedly. @@ -15,7 +15,7 @@ client.bulk([params, [callback]]) Perform many index/delete operations in a single API call. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-bulk.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-bulk.html[the elasticsearch docs] for more about this method. .Perform three operations in a single request [source,js] @@ -52,18 +52,14 @@ Options::: `refresh`:: `Boolean` -- Refresh the index after performing the operation -`[replication=sync]`:: -`String` -- Explicitely set the replication type -Options::: - * `"sync"` - * `"async"` - `routing`:: `String` -- Specific routing value `timeout`:: `Date, Number` -- Explicit operation timeout `type`:: `String` -- Default document type for items which don't provide one +`fields`:: +`String, String[], Boolean` -- Default comma-separated list of fields to return in the response for updates `index`:: `String` -- Default index for items which don't provide one @@ -79,7 +75,7 @@ client.clearScroll([params, [callback]]) Clear the scroll request created by specifying the scroll parameter to search. -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-request-scroll.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-request-scroll.html[the elasticsearch docs] for more about this method. // no examples @@ -102,7 +98,7 @@ client.count([params, [callback]]) Get the number of documents for the cluster, index, type, or a query. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-count.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-count.html[the elasticsearch docs] for more about this method. .Get the number of all documents in the cluster [source,js] @@ -201,7 +197,7 @@ client.countPercolate([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-percolate.html[the elasticsearch docs] for more about this method. // no examples @@ -258,7 +254,7 @@ client.create([params, [callback]]) Adds a typed JSON document in a specific index, making it searchable. If a document with the same `index`, `type`, and `id` already exists, an error will occur. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-index_.html[the elasticsearch docs] for more about this method. .Create a document [source,js] @@ -294,12 +290,6 @@ Options::: `String` -- ID of the parent document `refresh`:: `Boolean` -- Refresh the index after performing the operation -`[replication=sync]`:: -`String` -- Specific replication type -Options::: - * `"sync"` - * `"async"` - `routing`:: `String` -- Specific routing value `timeout`:: @@ -337,7 +327,7 @@ client.delete([params, [callback]]) Delete a typed JSON document from a specific index based on its id. -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-delete.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-delete.html[the elasticsearch docs] for more about this method. .Delete the document `/myindex/mytype/1` [source,js] @@ -366,12 +356,6 @@ Options::: `String` -- ID of parent document `refresh`:: `Boolean` -- Refresh the index after performing the operation -`[replication=sync]`:: -`String` -- Specific replication type -Options::: - * `"sync"` - * `"async"` - `routing`:: `String` -- Specific routing value `timeout`:: @@ -395,96 +379,6 @@ Options::: link:#[back to top] -[[api-deletebyquery]] -=== `deleteByQuery` - -[source,js] --------- -client.deleteByQuery([params, [callback]]) --------- - -Delete documents from one or more indices and one or more types based on a query. - -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-delete-by-query.html[the elasticsearch docs] for more about this method. - -.Deleting documents with a simple query -[source,js] ---------- -client.deleteByQuery({ - index: 'myindex', - q: 'test' -}, function (error, response) { - // ... -}); ---------- - -.Deleting documents using the Query DSL -[source,js] ---------- -client.deleteByQuery({ - index: 'posts', - body: { - query: { - term: { published: false } - } - } -}, function (error, response) { - // ... -}); ---------- - - -*Params* - -[horizontal] -`analyzer`:: -`String` -- The analyzer to use for the query string -`consistency`:: -`String` -- Specific write consistency setting for the operation -Options::: - * `"one"` - * `"quorum"` - * `"all"` - -`[defaultOperator=OR]`:: -`String` -- The default operator for query string query (AND or OR) -Options::: - * `"AND"` - * `"OR"` - -`df`:: -`String` -- The field to use as default where no field prefix is given in the query string -`ignoreUnavailable`:: -`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) -`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) -`[expandWildcards=open]`:: -`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. -Options::: - * `"open"` - * `"closed"` - * `"none"` - * `"all"` - -`[replication=sync]`:: -`String` -- Specific replication type -Options::: - * `"sync"` - * `"async"` - -`q`:: -`String` -- Query in the Lucene query string syntax -`routing`:: -`String` -- Specific routing value -`timeout`:: -`Date, Number` -- Explicit operation timeout -`index`:: -`String, String[], Boolean` -- A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices -`type`:: -`String, String[], Boolean` -- A comma-separated list of types to restrict the operation - -link:#[back to top] - [[api-deletescript]] === `deleteScript` @@ -495,7 +389,7 @@ client.deleteScript([params, [callback]]) // no description -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-scripting.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html[the elasticsearch docs] for more about this method. // no examples @@ -530,7 +424,7 @@ client.deleteTemplate([params, [callback]]) // no description -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-template.html[the elasticsearch docs] for more about this method. // no examples @@ -563,7 +457,7 @@ client.exists([params, [callback]]) Returns a boolean indicating whether or not a given document exists. -The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-get.html[the elasticsearch docs] for more about this method. .Check that the document `/myindex/mytype/1` exist [source,js] @@ -614,7 +508,7 @@ client.explain([params, [callback]]) Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-explain.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-explain.html[the elasticsearch docs] for more about this method. .See how a document is scored against a simple query [source,js] @@ -704,7 +598,7 @@ client.fieldStats([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-field-stats.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-field-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -747,7 +641,7 @@ client.get([params, [callback]]) Get a typed JSON document from the index based on its id. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-get.html[the elasticsearch docs] for more about this method. .Get `/myindex/mytype/1` [source,js] @@ -812,7 +706,7 @@ client.getScript([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-scripting.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html[the elasticsearch docs] for more about this method. // no examples @@ -848,7 +742,7 @@ client.getSource([params, [callback]]) Get the source of a document by its index, type and id. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-get.html[the elasticsearch docs] for more about this method. // no examples @@ -901,7 +795,7 @@ client.getTemplate([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-template.html[the elasticsearch docs] for more about this method. // no examples @@ -939,7 +833,7 @@ Optimistic concurrency control is performed, when the `version` argument is spec By default, the document will be available for `get()` actions immediately, but will only be available for searching after an index refresh (which can happen automatically or manually). See <>. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-index_.html[the elasticsearch docs] for more about this method. .Create or update a document [source,js] @@ -973,12 +867,6 @@ Options::: `String` -- ID of the parent document `refresh`:: `Boolean` -- Refresh the index after performing the operation -`[replication=sync]`:: -`String` -- Specific replication type -Options::: - * `"sync"` - * `"async"` - `routing`:: `String` -- Specific routing value `timeout`:: @@ -1032,7 +920,7 @@ client.mget([params, [callback]]) Get multiple documents based on an index, type (optional) and ids. The body required by mget can take two forms: an array of document locations, or an array of document ids. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-multi-get.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-multi-get.html[the elasticsearch docs] for more about this method. .An array of doc locations. Useful for getting documents from different indices. [source,js] @@ -1089,80 +977,6 @@ client.mget({ link:#[back to top] -[[api-mlt]] -=== `mlt` - -[source,js] --------- -client.mlt([params, [callback]]) --------- - -(more like this) Gets more documents that are “like” the document specified using `index`, `type`, and `id`. - -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-more-like-this.html[the elasticsearch docs] for more about this method. - -.Search for similar documents using the `title` property of document `myindex/mytype/1` -[source,js] ---------- -client.mlt({ - index: 'myindex', - type: 'mytype', - id: 1, - mlt_fields: 'title' -}, function (errors, response) { - // ... -}); ---------- - - -*Params* - -[horizontal] -`boostTerms`:: -`Number` -- The boost factor -`maxDocFreq`:: -`Number` -- The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored -`maxQueryTerms`:: -`Number` -- The maximum query terms to be included in the generated query -`maxWordLength`:: -`Number` -- The minimum length of the word: longer words will be ignored -`minDocFreq`:: -`Number` -- The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored -`minTermFreq`:: -`Number` -- The term frequency as percent: terms with lower occurence in the source document will be ignored -`minWordLength`:: -`Number` -- The minimum length of the word: shorter words will be ignored -`mltFields`:: -`String, String[], Boolean` -- Specific fields to perform the query against -`percentTermsToMatch`:: -`Number` -- How many terms have to match in order to consider the document a match (default: 0.3) -`routing`:: -`String` -- Specific routing value -`searchFrom`:: -`Number` -- The offset from which to return results -`searchIndices`:: -`String, String[], Boolean` -- A comma-separated list of indices to perform the query against (default: the index containing the document) -`searchScroll`:: -`String` -- A scroll search request definition -`searchSize`:: -`Number` -- The number of documents to return (default: 10) -`searchSource`:: -`String` -- A specific search request definition (instead of using the request body) -`searchType`:: -`String` -- Specific search type (eg. `dfs_then_fetch`, `count`, etc) -`searchTypes`:: -`String, String[], Boolean` -- A comma-separated list of types to perform the query against (default: the same type as the document) -`stopWords`:: -`String, String[], Boolean` -- A list of stop words to be ignored -`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) - -link:#[back to top] - [[api-mpercolate]] === `mpercolate` @@ -1173,7 +987,7 @@ client.mpercolate([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-percolate.html[the elasticsearch docs] for more about this method. // no examples @@ -1210,7 +1024,7 @@ client.msearch([params, [callback]]) Execute several search requests within the same request. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-multi-search.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-multi-search.html[the elasticsearch docs] for more about this method. .Perform multiple different searches, the body is made up of meta/data pairs [source,js] @@ -1259,7 +1073,7 @@ client.mtermvectors([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-multi-termvectors.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-multi-termvectors.html[the elasticsearch docs] for more about this method. // no examples @@ -1289,12 +1103,20 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-percolate.html[the elasticsearch docs] for more about this method. .First, Register queries named “alert-1” and “alert-2” for the “myindex” index [source,js] @@ -1405,11 +1227,6 @@ Options::: * `"none"` * `"all"` -`percolateFormat`:: -`String` -- Return an array of matching query IDs instead of objects -Options::: - * `"ids"` - `percolateIndex`:: `String` -- The index to percolate the document into. Defaults to index. `percolateType`:: @@ -1418,6 +1235,11 @@ Options::: `String` -- The routing value to use when percolating the existing document. `percolatePreference`:: `String` -- Which shard to prefer when executing the percolate request. +`percolateFormat`:: +`String` -- Return an array of matching query IDs instead of objects +Options::: + * `"ids"` + `version`:: `Number` -- Explicit version number for concurrency control `versionType`:: @@ -1463,7 +1285,7 @@ client.putScript([params, [callback]]) // no description -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-scripting.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html[the elasticsearch docs] for more about this method. // no examples @@ -1504,7 +1326,7 @@ client.putTemplate([params, [callback]]) // no description -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-template.html[the elasticsearch docs] for more about this method. // no examples @@ -1533,6 +1355,29 @@ Options::: link:#[back to top] +[[api-rendersearchtemplate]] +=== `renderSearchTemplate` + +[source,js] +-------- +client.renderSearchTemplate([params, [callback]]) +-------- + +// no description + +The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/2.0/search-template.html[the elasticsearch docs] for more about this method. + +// no examples + + +*Params* + +[horizontal] +`id`:: +`String` -- The id of the stored search template + +link:#[back to top] + [[api-scroll]] === `scroll` @@ -1543,7 +1388,7 @@ client.scroll([params, [callback]]) Scroll a search request (retrieve the next set of results) after specifying the scroll parameter in a `search()` call. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-request-scroll.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-request-scroll.html[the elasticsearch docs] for more about this method. .Collect every title in the index that contains the word "test" [source,js] @@ -1602,7 +1447,7 @@ TIP: https://github.com/fullscale/elastic.js[elastic.js] or https://github.com/h -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-search.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-search.html[the elasticsearch docs] for more about this method. .Search with a simple query string query [source,js] @@ -1691,9 +1536,7 @@ Options::: `String` -- Search operation type Options::: * `"query_then_fetch"` - * `"query_and_fetch"` * `"dfs_query_then_fetch"` - * `"dfs_query_and_fetch"` * `"count"` * `"scan"` @@ -1707,6 +1550,8 @@ Options::: `String, String[], Boolean` -- A list of fields to exclude from the returned _source field `_sourceInclude`:: `String, String[], Boolean` -- A list of fields to extract and return from the _source field +`terminateAfter`:: +`Number` -- The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. `stats`:: `String, String[], Boolean` -- Specific 'tag' of the request for logging and statistical purposes `suggestField`:: @@ -1728,8 +1573,8 @@ Options::: `Boolean` -- Whether to calculate and return scores even if they are not used for sorting `version`:: `Boolean` -- Specify whether to return document version as part of a hit -`queryCache`:: -`Boolean` -- Specify if query cache should be used for this request or not, defaults to index level setting +`requestCache`:: +`Boolean` -- Specify if request cache should be used for this request or not, defaults to index level setting `index`:: `String, String[], Boolean` -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices `type`:: @@ -1747,7 +1592,7 @@ client.searchExists([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-exists.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-exists.html[the elasticsearch docs] for more about this method. // no examples @@ -1808,7 +1653,7 @@ client.searchShards([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-shards.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-shards.html[the elasticsearch docs] for more about this method. // no examples @@ -1835,9 +1680,9 @@ Options::: * `"all"` `index`:: -`String` -- The name of the index +`String, String[], Boolean` -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices `type`:: -`String` -- The type of the document +`String, String[], Boolean` -- A comma-separated list of document types to search; leave empty to perform the operation on all types link:#[back to top] @@ -1904,7 +1749,7 @@ client.suggest([params, [callback]]) The suggest feature suggests similar looking terms based on a provided text by using a specific suggester. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-suggesters.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-suggesters.html[the elasticsearch docs] for more about this method. .Return query terms suggestions (“auto-correction”) [source,js] @@ -1966,17 +1811,17 @@ Options::: link:#[back to top] -[[api-termvector]] -=== `termvector` +[[api-termvectors]] +=== `termvectors` [source,js] -------- -client.termvector([params, [callback]]) +client.termvectors([params, [callback]]) -------- // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-termvectors.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-termvectors.html[the elasticsearch docs] for more about this method. // no examples @@ -1988,6 +1833,8 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-update.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-update.html[the elasticsearch docs] for more about this method. .Update document title using partial document [source,js] @@ -2117,12 +1974,6 @@ Options::: `String` -- ID of the parent document. Is is only used for routing and when for the upsert request `refresh`:: `Boolean` -- Refresh the index after performing the operation -`[replication=sync]`:: -`String` -- Specific replication type -Options::: - * `"sync"` - * `"async"` - `retryOnConflict`:: `Number` -- Specify how many times should the operation be retried when a conflict occurs (default: 0) `routing`:: @@ -2147,6 +1998,8 @@ Options::: * `"internal"` * `"force"` +`detectNoop`:: +`Boolean` -- Specifying as true will cause Elasticsearch to check if there are changes and, if there aren’t, turn the update request into a noop. `id`:: `String` -- Document ID `index`:: @@ -2199,7 +2052,7 @@ client.cat.allocation([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-allocation.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-allocation.html[the elasticsearch docs] for more about this method. // no examples @@ -2240,7 +2093,7 @@ client.cat.count([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-count.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-count.html[the elasticsearch docs] for more about this method. // no examples @@ -2273,7 +2126,7 @@ client.cat.fielddata([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-fielddata.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-fielddata.html[the elasticsearch docs] for more about this method. // no examples @@ -2314,7 +2167,7 @@ client.cat.health([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-health.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-health.html[the elasticsearch docs] for more about this method. // no examples @@ -2347,7 +2200,7 @@ client.cat.help([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat.html[the elasticsearch docs] for more about this method. // no examples @@ -2370,7 +2223,7 @@ client.cat.indices([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-indices.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-indices.html[the elasticsearch docs] for more about this method. // no examples @@ -2413,7 +2266,38 @@ client.cat.master([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-master.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-master.html[the elasticsearch docs] for more about this method. + +// no examples + + +*Params* + +[horizontal] +`local`:: +`Boolean` -- Return local information, do not retrieve the state from master node (default: false) +`masterTimeout`:: +`Date, Number` -- Explicit operation timeout for connection to master node +`h`:: +`String, String[], Boolean` -- Comma-separated list of column names to display +`help`:: +`Boolean` -- Return help information +`v`:: +`Boolean` -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-nodeattrs]] +=== `cat.nodeattrs` + +[source,js] +-------- +client.cat.nodeattrs([params, [callback]]) +-------- + +// no description + +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-nodeattrs.html[the elasticsearch docs] for more about this method. // no examples @@ -2444,7 +2328,7 @@ client.cat.nodes([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-nodes.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-nodes.html[the elasticsearch docs] for more about this method. // no examples @@ -2475,7 +2359,7 @@ client.cat.pendingTasks([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-pending-tasks.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-pending-tasks.html[the elasticsearch docs] for more about this method. // no examples @@ -2506,7 +2390,7 @@ client.cat.plugins([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-plugins.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-plugins.html[the elasticsearch docs] for more about this method. // no examples @@ -2537,7 +2421,7 @@ client.cat.recovery([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-recovery.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-recovery.html[the elasticsearch docs] for more about this method. // no examples @@ -2576,7 +2460,7 @@ client.cat.segments([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-segments.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-segments.html[the elasticsearch docs] for more about this method. // no examples @@ -2588,7 +2472,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-shards.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-shards.html[the elasticsearch docs] for more about this method. // no examples @@ -2638,7 +2522,7 @@ client.cat.threadPool([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-thread-pool.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-thread-pool.html[the elasticsearch docs] for more about this method. // no examples @@ -2671,7 +2555,7 @@ client.cluster.getSettings([params, [callback]]) Get cluster settings (previously set with `putSettings()`) -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-update-settings.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-update-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -2698,7 +2582,7 @@ client.cluster.health([params, [callback]]) Get a very simple status on the health of the cluster. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-health.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-health.html[the elasticsearch docs] for more about this method. // no examples @@ -2733,7 +2617,7 @@ Options::: * `"red"` `index`:: -`String` -- Limit the information returned to a specific index +`String, String[], Boolean` -- Limit the information returned to a specific index link:#[back to top] @@ -2747,7 +2631,7 @@ client.cluster.pendingTasks([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-pending.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-pending.html[the elasticsearch docs] for more about this method. // no examples @@ -2772,7 +2656,7 @@ client.cluster.putSettings([params, [callback]]) Update cluster wide specific settings. -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-update-settings.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-update-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -2799,7 +2683,7 @@ client.cluster.reroute([params, [callback]]) Explicitly execute a cluster reroute allocation command including specific commands. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-reroute.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-reroute.html[the elasticsearch docs] for more about this method. // no examples @@ -2830,7 +2714,7 @@ client.cluster.state([params, [callback]]) Get comprehensive details about the state of the whole cluster (indices settings, allocations, etc). -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-state.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-state.html[the elasticsearch docs] for more about this method. // no examples @@ -2873,7 +2757,7 @@ client.cluster.stats([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-stats.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -2902,7 +2786,7 @@ client.indices.analyze([params, [callback]]) Perform the analysis process on a text and return the tokens breakdown of the text. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-analyze.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-analyze.html[the elasticsearch docs] for more about this method. // no examples @@ -2923,7 +2807,7 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-clearcache.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-clearcache.html[the elasticsearch docs] for more about this method. // no examples @@ -2959,16 +2843,8 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-open-close.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-open-close.html[the elasticsearch docs] for more about this method. // no examples @@ -3026,7 +2902,7 @@ Options::: * `"all"` `index`:: -`String` -- The name of the index +`String, String[], Boolean` -- A comma separated list of indices to close link:#[back to top] @@ -3040,7 +2916,7 @@ client.indices.create([params, [callback]]) Create an index in Elasticsearch. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-create-index.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-create-index.html[the elasticsearch docs] for more about this method. // no examples @@ -3052,6 +2928,8 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-delete-index.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-delete-index.html[the elasticsearch docs] for more about this method. // no examples @@ -3094,7 +2972,7 @@ client.indices.deleteAlias([params, [callback]]) Delete a specific alias. -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3113,33 +2991,6 @@ The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-delete-mapping.html[the elasticsearch docs] for more about this method. - -// no examples - - -*Params* - -[horizontal] -`masterTimeout`:: -`Date, Number` -- Specify timeout for connection to master -`index`:: -`String, String[], Boolean` -- A comma-separated list of index names (supports wildcards); use `_all` for all indices -`type`:: -`String, String[], Boolean` -- A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices. - -link:#[back to top] - [[api-indices-deletetemplate]] === `indices.deleteTemplate` @@ -3150,7 +3001,7 @@ client.indices.deleteTemplate([params, [callback]]) Delete an index template by its name. -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3177,7 +3028,7 @@ client.indices.deleteWarmer([params, [callback]]) Delete an index warmer. -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-warmers.html[the elasticsearch docs] for more about this method. // no examples @@ -3204,7 +3055,7 @@ client.indices.exists([params, [callback]]) Return a boolean indicating whether given index exists. -The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-exists.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-exists.html[the elasticsearch docs] for more about this method. // no examples @@ -3241,7 +3092,7 @@ client.indices.existsAlias([params, [callback]]) Return a boolean indicating whether given alias exists. -The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3280,7 +3131,7 @@ client.indices.existsTemplate([params, [callback]]) // no description -The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3307,7 +3158,7 @@ client.indices.existsType([params, [callback]]) Check if a type/types exists in an index/indices. -The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-types-exists.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-types-exists.html[the elasticsearch docs] for more about this method. // no examples @@ -3346,7 +3197,7 @@ client.indices.flush([params, [callback]]) Explicitly flush one or more indices. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-flush.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-flush.html[the elasticsearch docs] for more about this method. // no examples @@ -3385,7 +3236,7 @@ client.indices.flushSynced([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-synced-flush.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-synced-flush.html[the elasticsearch docs] for more about this method. // no examples @@ -3393,8 +3244,6 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-index.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-index.html[the elasticsearch docs] for more about this method. // no examples @@ -3442,6 +3293,10 @@ Options::: * `"none"` * `"all"` +`flatSettings`:: +`Boolean` -- Return settings in flat format (default: false) +`human`:: +`Boolean` -- Whether to return version and creation date values in human-readable format. `index`:: `String, String[], Boolean` -- A comma-separated list of index names `feature`:: @@ -3459,7 +3314,7 @@ client.indices.getAlias([params, [callback]]) Retrieve a specified alias. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3498,7 +3353,7 @@ client.indices.getAliases([params, [callback]]) Retrieve specified aliases -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3527,7 +3382,7 @@ client.indices.getFieldMapping([params, [callback]]) Retrieve mapping definition of a specific field. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-field-mapping.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-field-mapping.html[the elasticsearch docs] for more about this method. // no examples @@ -3555,7 +3410,7 @@ Options::: `String, String[], Boolean` -- A comma-separated list of index names `type`:: `String, String[], Boolean` -- A comma-separated list of document types -`field`:: +`fields`:: `String, String[], Boolean` -- A comma-separated list of fields link:#[back to top] @@ -3570,7 +3425,7 @@ client.indices.getMapping([params, [callback]]) Retrieve mapping definition of index or index/type. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-mapping.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-mapping.html[the elasticsearch docs] for more about this method. // no examples @@ -3609,7 +3464,7 @@ client.indices.getSettings([params, [callback]]) Retrieve settings for one or more (or all) indices. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-settings.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -3633,6 +3488,8 @@ Options::: `Boolean` -- Return settings in flat format (default: false) `local`:: `Boolean` -- Return local information, do not retrieve the state from master node (default: false) +`human`:: +`Boolean` -- Whether to return version and creation date values in human-readable format. `index`:: `String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices `name`:: @@ -3650,7 +3507,7 @@ client.indices.getTemplate([params, [callback]]) Retrieve an index template by its name. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3665,7 +3522,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-upgrade.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-upgrade.html[the elasticsearch docs] for more about this method. // no examples @@ -3716,7 +3573,7 @@ client.indices.getWarmer([params, [callback]]) Retreieve an index warmer. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-warmers.html[the elasticsearch docs] for more about this method. // no examples @@ -3757,7 +3614,7 @@ client.indices.open([params, [callback]]) Open a closed index, making it available for search. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-open-close.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-open-close.html[the elasticsearch docs] for more about this method. // no examples @@ -3782,7 +3639,7 @@ Options::: * `"all"` `index`:: -`String` -- The name of the index +`String, String[], Boolean` -- A comma separated list of indices to open link:#[back to top] @@ -3796,7 +3653,7 @@ client.indices.optimize([params, [callback]]) Explicitly optimize one or more indices. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-optimize.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-optimize.html[the elasticsearch docs] for more about this method. // no examples @@ -3826,8 +3683,6 @@ Options::: `Anything` -- TODO: ? `waitForMerge`:: `Boolean` -- Specify whether the request should block until the merge process is finished (default: true) -`force`:: -`Boolean` -- Force a merge operation to run, even if there is a single segment in the index (default: false) `index`:: `String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -3843,7 +3698,7 @@ client.indices.putAlias([params, [callback]]) Create an alias for a specific index/indices. -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3872,7 +3727,7 @@ client.indices.putMapping([params, [callback]]) Register specific mapping definition for a specific type. -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-put-mapping.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-put-mapping.html[the elasticsearch docs] for more about this method. // no examples @@ -3880,8 +3735,6 @@ The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-update-settings.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-update-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -3954,7 +3809,7 @@ client.indices.putTemplate([params, [callback]]) Create an index template that will automatically be applied to new indices created. -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3987,7 +3842,7 @@ client.indices.putWarmer([params, [callback]]) Create an index warmer to run registered search requests to warm up the index before it is available for search. -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-warmers.html[the elasticsearch docs] for more about this method. // no examples @@ -4009,6 +3864,8 @@ Options::: * `"none"` * `"all"` +`requestCache`:: +`Boolean` -- Specify whether the request to be warmed should use the request cache, defaults to index level setting `index`:: `String, String[], Boolean` -- A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices `name`:: @@ -4028,7 +3885,7 @@ client.indices.recovery([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-recovery.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-recovery.html[the elasticsearch docs] for more about this method. // no examples @@ -4057,7 +3914,7 @@ client.indices.refresh([params, [callback]]) Explicitly refresh one or more index, making all operations performed since the last refresh available for search. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-refresh.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-refresh.html[the elasticsearch docs] for more about this method. // no examples @@ -4096,7 +3953,7 @@ client.indices.segments([params, [callback]]) Retrieve low level segments information that a Lucene index (shard level) is built with. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-segments.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-segments.html[the elasticsearch docs] for more about this method. // no examples @@ -4125,6 +3982,45 @@ Options::: link:#[back to top] +[[api-indices-shardstores]] +=== `indices.shardStores` + +[source,js] +-------- +client.indices.shardStores([params, [callback]]) +-------- + +// no description + +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-shards-stores.html[the elasticsearch docs] for more about this method. + +// no examples + + +*Params* + +[horizontal] +`status`:: +`String, String[], Boolean` -- A comma-separated list of statuses used to filter on shards to get store information for +`ignoreUnavailable`:: +`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`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) +`[expandWildcards=open]`:: +`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`operationThreading`:: +`Anything` -- TODO: ? +`index`:: +`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + [[api-indices-stats]] === `indices.stats` @@ -4135,7 +4031,7 @@ client.indices.stats([params, [callback]]) Retrieve statistics on different operations happening on an index. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-stats.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -4169,49 +4065,6 @@ Options::: link:#[back to top] -[[api-indices-status]] -=== `indices.status` - -[source,js] --------- -client.indices.status([params, [callback]]) --------- - -Get a comprehensive status information of one or more indices. - -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-status.html[the elasticsearch docs] for more about this method. - -// no examples - - -*Params* - -[horizontal] -`ignoreUnavailable`:: -`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) -`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) -`[expandWildcards=open]`:: -`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. -Options::: - * `"open"` - * `"closed"` - * `"none"` - * `"all"` - -`human`:: -`Boolean` -- Whether to return time and byte values in human-readable format. -`operationThreading`:: -`Anything` -- TODO: ? -`recovery`:: -`Boolean` -- Return information about shard recovery -`snapshot`:: -`Boolean` -- TODO: ? -`index`:: -`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - -link:#[back to top] - [[api-indices-updatealiases]] === `indices.updateAliases` @@ -4222,7 +4075,7 @@ client.indices.updateAliases([params, [callback]]) Update specified aliases. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. .Perform an atomic alias swap, for a rotating index [source,js] @@ -4260,7 +4113,7 @@ client.indices.upgrade([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-upgrade.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-upgrade.html[the elasticsearch docs] for more about this method. // no examples @@ -4281,7 +4134,7 @@ Options::: `ignoreUnavailable`:: `Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) `waitForCompletion`:: -`Boolean` -- Specify whether the request should block until the all segments are upgraded (default: true) +`Boolean` -- Specify whether the request should block until the all segments are upgraded (default: false) `onlyAncientSegments`:: `Boolean` -- If true, only ancient (an older Lucene major release) segments will be upgraded `index`:: @@ -4299,7 +4152,7 @@ client.indices.validateQuery([params, [callback]]) Validate a potentially expensive query without executing it. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-validate.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-validate.html[the elasticsearch docs] for more about this method. // no examples @@ -4360,7 +4213,7 @@ client.nodes.hotThreads([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-hot-threads.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-hot-threads.html[the elasticsearch docs] for more about this method. // no examples @@ -4400,7 +4253,7 @@ client.nodes.info([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-info.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-info.html[the elasticsearch docs] for more about this method. // no examples @@ -4421,33 +4274,6 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-shutdown.html[the elasticsearch docs] for more about this method. - -// no examples - - -*Params* - -[horizontal] -`delay`:: -`Date, Number` -- Set the delay for the operation (default: 1s) -`exit`:: -`Boolean` -- Exit the JVM as well (default: true) -`nodeId`:: -`String, String[], Boolean` -- A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes - -link:#[back to top] - [[api-nodes-stats]] === `nodes.stats` @@ -4458,7 +4284,7 @@ client.nodes.stats([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-stats.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -4506,7 +4332,7 @@ client.snapshot.create([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4535,7 +4361,7 @@ client.snapshot.createRepository([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4564,7 +4390,7 @@ client.snapshot.delete([params, [callback]]) // no description -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4591,7 +4417,7 @@ client.snapshot.deleteRepository([params, [callback]]) // no description -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4618,7 +4444,7 @@ client.snapshot.get([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4645,7 +4471,7 @@ client.snapshot.getRepository([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4672,7 +4498,7 @@ client.snapshot.restore([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4701,7 +4527,7 @@ client.snapshot.status([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4728,7 +4554,7 @@ client.snapshot.verifyRepository([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples diff --git a/docs/api_methods_2_0.asciidoc b/docs/api_methods_1_7.asciidoc similarity index 87% rename from docs/api_methods_2_0.asciidoc rename to docs/api_methods_1_7.asciidoc index fc62b94a1..f5ca351a4 100644 --- a/docs/api_methods_2_0.asciidoc +++ b/docs/api_methods_1_7.asciidoc @@ -1,11 +1,11 @@ -[[api-reference-2-0]] -== 2.0 API +[[api-reference-1-7]] +== 1.7 API -NOTE: At this time, you must opt into the 2.0 API by setting the `apiVersion` config parameter. +NOTE: At this time, you must opt into the 1.7 API by setting the `apiVersion` config parameter. -[[api-bulk-2-0]] +[[api-bulk-1-7]] === `bulk` [source,js] @@ -15,7 +15,7 @@ client.bulk([params, [callback]]) Perform many index/delete operations in a single API call. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-bulk.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-bulk.html[the elasticsearch docs] for more about this method. .Perform three operations in a single request [source,js] @@ -52,20 +52,24 @@ Options::: `refresh`:: `Boolean` -- Refresh the index after performing the operation +`[replication=sync]`:: +`String` -- Explicitely set the replication type +Options::: + * `"sync"` + * `"async"` + `routing`:: `String` -- Specific routing value `timeout`:: `Date, Number` -- Explicit operation timeout `type`:: `String` -- Default document type for items which don't provide one -`fields`:: -`String, String[], Boolean` -- Default comma-separated list of fields to return in the response for updates `index`:: `String` -- Default index for items which don't provide one link:#[back to top] -[[api-clearscroll-2-0]] +[[api-clearscroll-1-7]] === `clearScroll` [source,js] @@ -75,7 +79,7 @@ client.clearScroll([params, [callback]]) Clear the scroll request created by specifying the scroll parameter to search. -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-request-scroll.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-request-scroll.html[the elasticsearch docs] for more about this method. // no examples @@ -88,7 +92,7 @@ The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-count.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-count.html[the elasticsearch docs] for more about this method. .Get the number of all documents in the cluster [source,js] @@ -187,7 +191,7 @@ Options::: link:#[back to top] -[[api-countpercolate-2-0]] +[[api-countpercolate-1-7]] === `countPercolate` [source,js] @@ -197,7 +201,7 @@ client.countPercolate([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-percolate.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html[the elasticsearch docs] for more about this method. // no examples @@ -244,7 +248,7 @@ Options::: link:#[back to top] -[[api-create-2-0]] +[[api-create-1-7]] === `create` [source,js] @@ -254,7 +258,7 @@ client.create([params, [callback]]) Adds a typed JSON document in a specific index, making it searchable. If a document with the same `index`, `type`, and `id` already exists, an error will occur. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-index_.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html[the elasticsearch docs] for more about this method. .Create a document [source,js] @@ -290,6 +294,12 @@ Options::: `String` -- ID of the parent document `refresh`:: `Boolean` -- Refresh the index after performing the operation +`[replication=sync]`:: +`String` -- Specific replication type +Options::: + * `"sync"` + * `"async"` + `routing`:: `String` -- Specific routing value `timeout`:: @@ -317,7 +327,7 @@ Options::: link:#[back to top] -[[api-delete-2-0]] +[[api-delete-1-7]] === `delete` [source,js] @@ -327,7 +337,7 @@ client.delete([params, [callback]]) Delete a typed JSON document from a specific index based on its id. -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-delete.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-delete.html[the elasticsearch docs] for more about this method. .Delete the document `/myindex/mytype/1` [source,js] @@ -356,6 +366,12 @@ Options::: `String` -- ID of parent document `refresh`:: `Boolean` -- Refresh the index after performing the operation +`[replication=sync]`:: +`String` -- Specific replication type +Options::: + * `"sync"` + * `"async"` + `routing`:: `String` -- Specific routing value `timeout`:: @@ -379,7 +395,97 @@ Options::: link:#[back to top] -[[api-deletescript-2-0]] +[[api-deletebyquery-1-7]] +=== `deleteByQuery` + +[source,js] +-------- +client.deleteByQuery([params, [callback]]) +-------- + +Delete documents from one or more indices and one or more types based on a query. + +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-delete-by-query.html[the elasticsearch docs] for more about this method. + +.Deleting documents with a simple query +[source,js] +--------- +client.deleteByQuery({ + index: 'myindex', + q: 'test' +}, function (error, response) { + // ... +}); +--------- + +.Deleting documents using the Query DSL +[source,js] +--------- +client.deleteByQuery({ + index: 'posts', + body: { + query: { + term: { published: false } + } + } +}, function (error, response) { + // ... +}); +--------- + + +*Params* + +[horizontal] +`analyzer`:: +`String` -- The analyzer to use for the query string +`consistency`:: +`String` -- Specific write consistency setting for the operation +Options::: + * `"one"` + * `"quorum"` + * `"all"` + +`[defaultOperator=OR]`:: +`String` -- The default operator for query string query (AND or OR) +Options::: + * `"AND"` + * `"OR"` + +`df`:: +`String` -- The field to use as default where no field prefix is given in the query string +`ignoreUnavailable`:: +`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`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) +`[expandWildcards=open]`:: +`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`[replication=sync]`:: +`String` -- Specific replication type +Options::: + * `"sync"` + * `"async"` + +`q`:: +`String` -- Query in the Lucene query string syntax +`routing`:: +`String` -- Specific routing value +`timeout`:: +`Date, Number` -- Explicit operation timeout +`index`:: +`String, String[], Boolean` -- A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices +`type`:: +`String, String[], Boolean` -- A comma-separated list of types to restrict the operation + +link:#[back to top] + +[[api-deletescript-1-7]] === `deleteScript` [source,js] @@ -389,7 +495,7 @@ client.deleteScript([params, [callback]]) // no description -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-scripting.html[the elasticsearch docs] for more about this method. // no examples @@ -414,7 +520,7 @@ Options::: link:#[back to top] -[[api-deletetemplate-2-0]] +[[api-deletetemplate-1-7]] === `deleteTemplate` [source,js] @@ -424,7 +530,7 @@ client.deleteTemplate([params, [callback]]) // no description -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-template.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html[the elasticsearch docs] for more about this method. // no examples @@ -447,7 +553,7 @@ Options::: link:#[back to top] -[[api-exists-2-0]] +[[api-exists-1-7]] === `exists` [source,js] @@ -457,7 +563,7 @@ client.exists([params, [callback]]) Returns a boolean indicating whether or not a given document exists. -The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-get.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html[the elasticsearch docs] for more about this method. .Check that the document `/myindex/mytype/1` exist [source,js] @@ -498,7 +604,7 @@ client.exists({ link:#[back to top] -[[api-explain-2-0]] +[[api-explain-1-7]] === `explain` [source,js] @@ -508,7 +614,7 @@ client.explain([params, [callback]]) Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-explain.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-explain.html[the elasticsearch docs] for more about this method. .See how a document is scored against a simple query [source,js] @@ -588,7 +694,7 @@ Options::: link:#[back to top] -[[api-fieldstats-2-0]] +[[api-fieldstats-1-7]] === `fieldStats` [source,js] @@ -598,7 +704,7 @@ client.fieldStats([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-field-stats.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-field-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -631,7 +737,7 @@ Options::: link:#[back to top] -[[api-get-2-0]] +[[api-get-1-7]] === `get` [source,js] @@ -641,7 +747,7 @@ client.get([params, [callback]]) Get a typed JSON document from the index based on its id. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-get.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html[the elasticsearch docs] for more about this method. .Get `/myindex/mytype/1` [source,js] @@ -696,7 +802,7 @@ Options::: link:#[back to top] -[[api-getscript-2-0]] +[[api-getscript-1-7]] === `getScript` [source,js] @@ -706,7 +812,7 @@ client.getScript([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-scripting.html[the elasticsearch docs] for more about this method. // no examples @@ -731,7 +837,7 @@ Options::: link:#[back to top] -[[api-getsource-2-0]] +[[api-getsource-1-7]] === `getSource` [source,js] @@ -742,7 +848,7 @@ client.getSource([params, [callback]]) Get the source of a document by its index, type and id. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-get.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html[the elasticsearch docs] for more about this method. // no examples @@ -785,7 +891,7 @@ Options::: link:#[back to top] -[[api-gettemplate-2-0]] +[[api-gettemplate-1-7]] === `getTemplate` [source,js] @@ -795,7 +901,7 @@ client.getTemplate([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-template.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html[the elasticsearch docs] for more about this method. // no examples @@ -818,7 +924,7 @@ Options::: link:#[back to top] -[[api-index-2-0]] +[[api-index-1-7]] === `index` [source,js] @@ -833,7 +939,7 @@ Optimistic concurrency control is performed, when the `version` argument is spec By default, the document will be available for `get()` actions immediately, but will only be available for searching after an index refresh (which can happen automatically or manually). See <>. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-index_.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html[the elasticsearch docs] for more about this method. .Create or update a document [source,js] @@ -867,6 +973,12 @@ Options::: `String` -- ID of the parent document `refresh`:: `Boolean` -- Refresh the index after performing the operation +`[replication=sync]`:: +`String` -- Specific replication type +Options::: + * `"sync"` + * `"async"` + `routing`:: `String` -- Specific routing value `timeout`:: @@ -894,7 +1006,7 @@ Options::: link:#[back to top] -[[api-info-2-0]] +[[api-info-1-7]] === `info` [source,js] @@ -910,7 +1022,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-multi-get.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-multi-get.html[the elasticsearch docs] for more about this method. .An array of doc locations. Useful for getting documents from different indices. [source,js] @@ -977,7 +1089,81 @@ client.mget({ link:#[back to top] -[[api-mpercolate-2-0]] +[[api-mlt-1-7]] +=== `mlt` + +[source,js] +-------- +client.mlt([params, [callback]]) +-------- + +(more like this) Gets more documents that are “like” the document specified using `index`, `type`, and `id`. + +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-more-like-this.html[the elasticsearch docs] for more about this method. + +.Search for similar documents using the `title` property of document `myindex/mytype/1` +[source,js] +--------- +client.mlt({ + index: 'myindex', + type: 'mytype', + id: 1, + mlt_fields: 'title' +}, function (errors, response) { + // ... +}); +--------- + + +*Params* + +[horizontal] +`boostTerms`:: +`Number` -- The boost factor +`maxDocFreq`:: +`Number` -- The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored +`maxQueryTerms`:: +`Number` -- The maximum query terms to be included in the generated query +`maxWordLength`:: +`Number` -- The minimum length of the word: longer words will be ignored +`minDocFreq`:: +`Number` -- The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored +`minTermFreq`:: +`Number` -- The term frequency as percent: terms with lower occurence in the source document will be ignored +`minWordLength`:: +`Number` -- The minimum length of the word: shorter words will be ignored +`mltFields`:: +`String, String[], Boolean` -- Specific fields to perform the query against +`percentTermsToMatch`:: +`Number` -- How many terms have to match in order to consider the document a match (default: 0.3) +`routing`:: +`String` -- Specific routing value +`searchFrom`:: +`Number` -- The offset from which to return results +`searchIndices`:: +`String, String[], Boolean` -- A comma-separated list of indices to perform the query against (default: the index containing the document) +`searchScroll`:: +`String` -- A scroll search request definition +`searchSize`:: +`Number` -- The number of documents to return (default: 10) +`searchSource`:: +`String` -- A specific search request definition (instead of using the request body) +`searchType`:: +`String` -- Specific search type (eg. `dfs_then_fetch`, `count`, etc) +`searchTypes`:: +`String, String[], Boolean` -- A comma-separated list of types to perform the query against (default: the same type as the document) +`stopWords`:: +`String, String[], Boolean` -- A list of stop words to be ignored +`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) + +link:#[back to top] + +[[api-mpercolate-1-7]] === `mpercolate` [source,js] @@ -987,7 +1173,7 @@ client.mpercolate([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-percolate.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html[the elasticsearch docs] for more about this method. // no examples @@ -1014,7 +1200,7 @@ Options::: link:#[back to top] -[[api-msearch-2-0]] +[[api-msearch-1-7]] === `msearch` [source,js] @@ -1024,7 +1210,7 @@ client.msearch([params, [callback]]) Execute several search requests within the same request. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-multi-search.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-multi-search.html[the elasticsearch docs] for more about this method. .Perform multiple different searches, the body is made up of meta/data pairs [source,js] @@ -1063,7 +1249,7 @@ Options::: link:#[back to top] -[[api-mtermvectors-2-0]] +[[api-mtermvectors-1-7]] === `mtermvectors` [source,js] @@ -1073,7 +1259,7 @@ client.mtermvectors([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-multi-termvectors.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-multi-termvectors.html[the elasticsearch docs] for more about this method. // no examples @@ -1103,24 +1289,16 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-percolate.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html[the elasticsearch docs] for more about this method. .First, Register queries named “alert-1” and “alert-2” for the “myindex” index [source,js] @@ -1227,6 +1405,11 @@ Options::: * `"none"` * `"all"` +`percolateFormat`:: +`String` -- Return an array of matching query IDs instead of objects +Options::: + * `"ids"` + `percolateIndex`:: `String` -- The index to percolate the document into. Defaults to index. `percolateType`:: @@ -1235,11 +1418,6 @@ Options::: `String` -- The routing value to use when percolating the existing document. `percolatePreference`:: `String` -- Which shard to prefer when executing the percolate request. -`percolateFormat`:: -`String` -- Return an array of matching query IDs instead of objects -Options::: - * `"ids"` - `version`:: `Number` -- Explicit version number for concurrency control `versionType`:: @@ -1259,7 +1437,7 @@ Options::: link:#[back to top] -[[api-ping-2-0]] +[[api-ping-1-7]] === `ping` [source,js] @@ -1275,7 +1453,7 @@ The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-scripting.html[the elasticsearch docs] for more about this method. // no examples @@ -1316,7 +1494,7 @@ Options::: link:#[back to top] -[[api-puttemplate-2-0]] +[[api-puttemplate-1-7]] === `putTemplate` [source,js] @@ -1326,7 +1504,7 @@ client.putTemplate([params, [callback]]) // no description -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-template.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html[the elasticsearch docs] for more about this method. // no examples @@ -1355,30 +1533,7 @@ Options::: link:#[back to top] -[[api-rendersearchtemplate-2-0]] -=== `renderSearchTemplate` - -[source,js] --------- -client.renderSearchTemplate([params, [callback]]) --------- - -// no description - -The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/2.0/search-template.html[the elasticsearch docs] for more about this method. - -// no examples - - -*Params* - -[horizontal] -`id`:: -`String` -- The id of the stored search template - -link:#[back to top] - -[[api-scroll-2-0]] +[[api-scroll-1-7]] === `scroll` [source,js] @@ -1388,7 +1543,7 @@ client.scroll([params, [callback]]) Scroll a search request (retrieve the next set of results) after specifying the scroll parameter in a `search()` call. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-request-scroll.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-request-scroll.html[the elasticsearch docs] for more about this method. .Collect every title in the index that contains the word "test" [source,js] @@ -1433,7 +1588,7 @@ client.search({ link:#[back to top] -[[api-search-2-0]] +[[api-search-1-7]] === `search` [source,js] @@ -1447,7 +1602,7 @@ TIP: https://github.com/fullscale/elastic.js[elastic.js] or https://github.com/h -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-search.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-search.html[the elasticsearch docs] for more about this method. .Search with a simple query string query [source,js] @@ -1536,7 +1691,9 @@ Options::: `String` -- Search operation type Options::: * `"query_then_fetch"` + * `"query_and_fetch"` * `"dfs_query_then_fetch"` + * `"dfs_query_and_fetch"` * `"count"` * `"scan"` @@ -1550,8 +1707,6 @@ Options::: `String, String[], Boolean` -- A list of fields to exclude from the returned _source field `_sourceInclude`:: `String, String[], Boolean` -- A list of fields to extract and return from the _source field -`terminateAfter`:: -`Number` -- The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. `stats`:: `String, String[], Boolean` -- Specific 'tag' of the request for logging and statistical purposes `suggestField`:: @@ -1573,8 +1728,8 @@ Options::: `Boolean` -- Whether to calculate and return scores even if they are not used for sorting `version`:: `Boolean` -- Specify whether to return document version as part of a hit -`requestCache`:: -`Boolean` -- Specify if request cache should be used for this request or not, defaults to index level setting +`queryCache`:: +`Boolean` -- Specify if query cache should be used for this request or not, defaults to index level setting `index`:: `String, String[], Boolean` -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices `type`:: @@ -1582,7 +1737,7 @@ Options::: link:#[back to top] -[[api-searchexists-2-0]] +[[api-searchexists-1-7]] === `searchExists` [source,js] @@ -1592,7 +1747,7 @@ client.searchExists([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-exists.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-exists.html[the elasticsearch docs] for more about this method. // no examples @@ -1643,7 +1798,7 @@ Options::: link:#[back to top] -[[api-searchshards-2-0]] +[[api-searchshards-1-7]] === `searchShards` [source,js] @@ -1653,7 +1808,7 @@ client.searchShards([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-shards.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-shards.html[the elasticsearch docs] for more about this method. // no examples @@ -1680,13 +1835,13 @@ Options::: * `"all"` `index`:: -`String, String[], Boolean` -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices +`String` -- The name of the index `type`:: -`String, String[], Boolean` -- A comma-separated list of document types to search; leave empty to perform the operation on all types +`String` -- The type of the document link:#[back to top] -[[api-searchtemplate-2-0]] +[[api-searchtemplate-1-7]] === `searchTemplate` [source,js] @@ -1739,7 +1894,7 @@ Options::: link:#[back to top] -[[api-suggest-2-0]] +[[api-suggest-1-7]] === `suggest` [source,js] @@ -1749,7 +1904,7 @@ client.suggest([params, [callback]]) The suggest feature suggests similar looking terms based on a provided text by using a specific suggester. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-suggesters.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-suggesters.html[the elasticsearch docs] for more about this method. .Return query terms suggestions (“auto-correction”) [source,js] @@ -1811,17 +1966,17 @@ Options::: link:#[back to top] -[[api-termvectors-2-0]] -=== `termvectors` +[[api-termvector-1-7]] +=== `termvector` [source,js] -------- -client.termvectors([params, [callback]]) +client.termvector([params, [callback]]) -------- // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-termvectors.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-termvectors.html[the elasticsearch docs] for more about this method. // no examples @@ -1833,8 +1988,6 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-update.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-update.html[the elasticsearch docs] for more about this method. .Update document title using partial document [source,js] @@ -1974,6 +2117,12 @@ Options::: `String` -- ID of the parent document. Is is only used for routing and when for the upsert request `refresh`:: `Boolean` -- Refresh the index after performing the operation +`[replication=sync]`:: +`String` -- Specific replication type +Options::: + * `"sync"` + * `"async"` + `retryOnConflict`:: `Number` -- Specify how many times should the operation be retried when a conflict occurs (default: 0) `routing`:: @@ -1998,8 +2147,6 @@ Options::: * `"internal"` * `"force"` -`detectNoop`:: -`Boolean` -- Specifying as true will cause Elasticsearch to check if there are changes and, if there aren’t, turn the update request into a noop. `id`:: `String` -- Document ID `index`:: @@ -2009,7 +2156,7 @@ Options::: link:#[back to top] -[[api-cat-aliases-2-0]] +[[api-cat-aliases-1-7]] === `cat.aliases` [source,js] @@ -2042,7 +2189,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-allocation.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-allocation.html[the elasticsearch docs] for more about this method. // no examples @@ -2083,7 +2230,7 @@ Options::: link:#[back to top] -[[api-cat-count-2-0]] +[[api-cat-count-1-7]] === `cat.count` [source,js] @@ -2093,7 +2240,7 @@ client.cat.count([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-count.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-count.html[the elasticsearch docs] for more about this method. // no examples @@ -2116,7 +2263,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-fielddata.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-fielddata.html[the elasticsearch docs] for more about this method. // no examples @@ -2157,7 +2304,7 @@ Options::: link:#[back to top] -[[api-cat-health-2-0]] +[[api-cat-health-1-7]] === `cat.health` [source,js] @@ -2167,7 +2314,7 @@ client.cat.health([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-health.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-health.html[the elasticsearch docs] for more about this method. // no examples @@ -2190,7 +2337,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat.html[the elasticsearch docs] for more about this method. // no examples @@ -2213,7 +2360,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-indices.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-indices.html[the elasticsearch docs] for more about this method. // no examples @@ -2256,7 +2403,7 @@ Options::: link:#[back to top] -[[api-cat-master-2-0]] +[[api-cat-master-1-7]] === `cat.master` [source,js] @@ -2266,7 +2413,7 @@ client.cat.master([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-master.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-master.html[the elasticsearch docs] for more about this method. // no examples @@ -2287,38 +2434,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-nodeattrs.html[the elasticsearch docs] for more about this method. - -// no examples - - -*Params* - -[horizontal] -`local`:: -`Boolean` -- Return local information, do not retrieve the state from master node (default: false) -`masterTimeout`:: -`Date, Number` -- Explicit operation timeout for connection to master node -`h`:: -`String, String[], Boolean` -- Comma-separated list of column names to display -`help`:: -`Boolean` -- Return help information -`v`:: -`Boolean` -- Verbose mode. Display column headers - -link:#[back to top] - -[[api-cat-nodes-2-0]] +[[api-cat-nodes-1-7]] === `cat.nodes` [source,js] @@ -2328,7 +2444,7 @@ client.cat.nodes([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-nodes.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-nodes.html[the elasticsearch docs] for more about this method. // no examples @@ -2349,7 +2465,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-pending-tasks.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-pending-tasks.html[the elasticsearch docs] for more about this method. // no examples @@ -2380,7 +2496,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-plugins.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-plugins.html[the elasticsearch docs] for more about this method. // no examples @@ -2411,7 +2527,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-recovery.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-recovery.html[the elasticsearch docs] for more about this method. // no examples @@ -2450,7 +2566,7 @@ Options::: link:#[back to top] -[[api-cat-segments-2-0]] +[[api-cat-segments-1-7]] === `cat.segments` [source,js] @@ -2460,7 +2576,7 @@ client.cat.segments([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-segments.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-segments.html[the elasticsearch docs] for more about this method. // no examples @@ -2472,14 +2588,14 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-shards.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-shards.html[the elasticsearch docs] for more about this method. // no examples @@ -2512,7 +2628,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-thread-pool.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-thread-pool.html[the elasticsearch docs] for more about this method. // no examples @@ -2545,7 +2661,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-update-settings.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-update-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -2572,7 +2688,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-health.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-health.html[the elasticsearch docs] for more about this method. // no examples @@ -2617,11 +2733,11 @@ Options::: * `"red"` `index`:: -`String, String[], Boolean` -- Limit the information returned to a specific index +`String` -- Limit the information returned to a specific index link:#[back to top] -[[api-cluster-pendingtasks-2-0]] +[[api-cluster-pendingtasks-1-7]] === `cluster.pendingTasks` [source,js] @@ -2631,7 +2747,7 @@ client.cluster.pendingTasks([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-pending.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-pending.html[the elasticsearch docs] for more about this method. // no examples @@ -2646,7 +2762,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-update-settings.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-update-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -2673,7 +2789,7 @@ The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-reroute.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-reroute.html[the elasticsearch docs] for more about this method. // no examples @@ -2704,7 +2820,7 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-state.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-state.html[the elasticsearch docs] for more about this method. // no examples @@ -2747,7 +2863,7 @@ Options::: link:#[back to top] -[[api-cluster-stats-2-0]] +[[api-cluster-stats-1-7]] === `cluster.stats` [source,js] @@ -2757,7 +2873,7 @@ client.cluster.stats([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-stats.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -2776,7 +2892,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-analyze.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-analyze.html[the elasticsearch docs] for more about this method. // no examples @@ -2807,7 +2923,7 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-clearcache.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-clearcache.html[the elasticsearch docs] for more about this method. // no examples @@ -2843,8 +2959,16 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-open-close.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-open-close.html[the elasticsearch docs] for more about this method. // no examples @@ -2902,11 +3026,11 @@ Options::: * `"all"` `index`:: -`String, String[], Boolean` -- A comma separated list of indices to close +`String` -- The name of the index link:#[back to top] -[[api-indices-create-2-0]] +[[api-indices-create-1-7]] === `indices.create` [source,js] @@ -2916,7 +3040,7 @@ client.indices.create([params, [callback]]) Create an index in Elasticsearch. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-create-index.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-create-index.html[the elasticsearch docs] for more about this method. // no examples @@ -2928,14 +3052,12 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-delete-index.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-delete-index.html[the elasticsearch docs] for more about this method. // no examples @@ -2962,7 +3084,7 @@ The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -2991,7 +3113,34 @@ The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-delete-mapping.html[the elasticsearch docs] for more about this method. + +// no examples + + +*Params* + +[horizontal] +`masterTimeout`:: +`Date, Number` -- Specify timeout for connection to master +`index`:: +`String, String[], Boolean` -- A comma-separated list of index names (supports wildcards); use `_all` for all indices +`type`:: +`String, String[], Boolean` -- A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices. + +link:#[back to top] + +[[api-indices-deletetemplate-1-7]] === `indices.deleteTemplate` [source,js] @@ -3001,7 +3150,7 @@ client.indices.deleteTemplate([params, [callback]]) Delete an index template by its name. -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3018,7 +3167,7 @@ The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-warmers.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html[the elasticsearch docs] for more about this method. // no examples @@ -3045,7 +3194,7 @@ The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-exists.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-exists.html[the elasticsearch docs] for more about this method. // no examples @@ -3082,7 +3231,7 @@ Options::: link:#[back to top] -[[api-indices-existsalias-2-0]] +[[api-indices-existsalias-1-7]] === `indices.existsAlias` [source,js] @@ -3092,7 +3241,7 @@ client.indices.existsAlias([params, [callback]]) Return a boolean indicating whether given alias exists. -The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3121,7 +3270,7 @@ Options::: link:#[back to top] -[[api-indices-existstemplate-2-0]] +[[api-indices-existstemplate-1-7]] === `indices.existsTemplate` [source,js] @@ -3131,7 +3280,7 @@ client.indices.existsTemplate([params, [callback]]) // no description -The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3148,7 +3297,7 @@ The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-types-exists.html[the elasticsearch docs] for more about this method. +The default method is `HEAD` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-types-exists.html[the elasticsearch docs] for more about this method. // no examples @@ -3187,7 +3336,7 @@ Options::: link:#[back to top] -[[api-indices-flush-2-0]] +[[api-indices-flush-1-7]] === `indices.flush` [source,js] @@ -3197,7 +3346,7 @@ client.indices.flush([params, [callback]]) Explicitly flush one or more indices. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-flush.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-flush.html[the elasticsearch docs] for more about this method. // no examples @@ -3226,7 +3375,7 @@ Options::: link:#[back to top] -[[api-indices-flushsynced-2-0]] +[[api-indices-flushsynced-1-7]] === `indices.flushSynced` [source,js] @@ -3236,7 +3385,7 @@ client.indices.flushSynced([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-synced-flush.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-synced-flush.html[the elasticsearch docs] for more about this method. // no examples @@ -3244,6 +3393,8 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-index.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-index.html[the elasticsearch docs] for more about this method. // no examples @@ -3293,10 +3442,6 @@ Options::: * `"none"` * `"all"` -`flatSettings`:: -`Boolean` -- Return settings in flat format (default: false) -`human`:: -`Boolean` -- Whether to return version and creation date values in human-readable format. `index`:: `String, String[], Boolean` -- A comma-separated list of index names `feature`:: @@ -3304,7 +3449,7 @@ Options::: link:#[back to top] -[[api-indices-getalias-2-0]] +[[api-indices-getalias-1-7]] === `indices.getAlias` [source,js] @@ -3314,7 +3459,7 @@ client.indices.getAlias([params, [callback]]) Retrieve a specified alias. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3343,7 +3488,7 @@ Options::: link:#[back to top] -[[api-indices-getaliases-2-0]] +[[api-indices-getaliases-1-7]] === `indices.getAliases` [source,js] @@ -3353,7 +3498,7 @@ client.indices.getAliases([params, [callback]]) Retrieve specified aliases -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3372,7 +3517,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-field-mapping.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-field-mapping.html[the elasticsearch docs] for more about this method. // no examples @@ -3410,12 +3555,12 @@ Options::: `String, String[], Boolean` -- A comma-separated list of index names `type`:: `String, String[], Boolean` -- A comma-separated list of document types -`fields`:: +`field`:: `String, String[], Boolean` -- A comma-separated list of fields link:#[back to top] -[[api-indices-getmapping-2-0]] +[[api-indices-getmapping-1-7]] === `indices.getMapping` [source,js] @@ -3425,7 +3570,7 @@ client.indices.getMapping([params, [callback]]) Retrieve mapping definition of index or index/type. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-mapping.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-mapping.html[the elasticsearch docs] for more about this method. // no examples @@ -3454,7 +3599,7 @@ Options::: link:#[back to top] -[[api-indices-getsettings-2-0]] +[[api-indices-getsettings-1-7]] === `indices.getSettings` [source,js] @@ -3464,7 +3609,7 @@ client.indices.getSettings([params, [callback]]) Retrieve settings for one or more (or all) indices. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-settings.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -3488,8 +3633,6 @@ Options::: `Boolean` -- Return settings in flat format (default: false) `local`:: `Boolean` -- Return local information, do not retrieve the state from master node (default: false) -`human`:: -`Boolean` -- Whether to return version and creation date values in human-readable format. `index`:: `String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices `name`:: @@ -3497,7 +3640,7 @@ Options::: link:#[back to top] -[[api-indices-gettemplate-2-0]] +[[api-indices-gettemplate-1-7]] === `indices.getTemplate` [source,js] @@ -3507,7 +3650,7 @@ client.indices.getTemplate([params, [callback]]) Retrieve an index template by its name. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3522,11 +3665,11 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-upgrade.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-upgrade.html[the elasticsearch docs] for more about this method. // no examples @@ -3563,7 +3706,7 @@ Options::: link:#[back to top] -[[api-indices-getwarmer-2-0]] +[[api-indices-getwarmer-1-7]] === `indices.getWarmer` [source,js] @@ -3573,7 +3716,7 @@ client.indices.getWarmer([params, [callback]]) Retreieve an index warmer. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-warmers.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html[the elasticsearch docs] for more about this method. // no examples @@ -3604,7 +3747,7 @@ Options::: link:#[back to top] -[[api-indices-open-2-0]] +[[api-indices-open-1-7]] === `indices.open` [source,js] @@ -3614,7 +3757,7 @@ client.indices.open([params, [callback]]) Open a closed index, making it available for search. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-open-close.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-open-close.html[the elasticsearch docs] for more about this method. // no examples @@ -3639,11 +3782,11 @@ Options::: * `"all"` `index`:: -`String, String[], Boolean` -- A comma separated list of indices to open +`String` -- The name of the index link:#[back to top] -[[api-indices-optimize-2-0]] +[[api-indices-optimize-1-7]] === `indices.optimize` [source,js] @@ -3653,7 +3796,7 @@ client.indices.optimize([params, [callback]]) Explicitly optimize one or more indices. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-optimize.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-optimize.html[the elasticsearch docs] for more about this method. // no examples @@ -3683,12 +3826,14 @@ Options::: `Anything` -- TODO: ? `waitForMerge`:: `Boolean` -- Specify whether the request should block until the merge process is finished (default: true) +`force`:: +`Boolean` -- Force a merge operation to run, even if there is a single segment in the index (default: false) `index`:: `String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices link:#[back to top] -[[api-indices-putalias-2-0]] +[[api-indices-putalias-1-7]] === `indices.putAlias` [source,js] @@ -3698,7 +3843,7 @@ client.indices.putAlias([params, [callback]]) Create an alias for a specific index/indices. -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3717,7 +3862,7 @@ The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-put-mapping.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-put-mapping.html[the elasticsearch docs] for more about this method. // no examples @@ -3735,6 +3880,8 @@ The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-update-settings.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-update-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -3799,7 +3944,7 @@ Options::: link:#[back to top] -[[api-indices-puttemplate-2-0]] +[[api-indices-puttemplate-1-7]] === `indices.putTemplate` [source,js] @@ -3809,7 +3954,7 @@ client.indices.putTemplate([params, [callback]]) Create an index template that will automatically be applied to new indices created. -The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3832,7 +3977,7 @@ The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-warmers.html[the elasticsearch docs] for more about this method. +The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html[the elasticsearch docs] for more about this method. // no examples @@ -3864,8 +4009,6 @@ Options::: * `"none"` * `"all"` -`requestCache`:: -`Boolean` -- Specify whether the request to be warmed should use the request cache, defaults to index level setting `index`:: `String, String[], Boolean` -- A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices `name`:: @@ -3875,7 +4018,7 @@ Options::: link:#[back to top] -[[api-indices-recovery-2-0]] +[[api-indices-recovery-1-7]] === `indices.recovery` [source,js] @@ -3885,7 +4028,7 @@ client.indices.recovery([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-recovery.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-recovery.html[the elasticsearch docs] for more about this method. // no examples @@ -3904,7 +4047,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-refresh.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-refresh.html[the elasticsearch docs] for more about this method. // no examples @@ -3943,7 +4086,7 @@ Options::: link:#[back to top] -[[api-indices-segments-2-0]] +[[api-indices-segments-1-7]] === `indices.segments` [source,js] @@ -3953,7 +4096,7 @@ client.indices.segments([params, [callback]]) Retrieve low level segments information that a Lucene index (shard level) is built with. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-segments.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-segments.html[the elasticsearch docs] for more about this method. // no examples @@ -3982,46 +4125,7 @@ Options::: link:#[back to top] -[[api-indices-shardstores-2-0]] -=== `indices.shardStores` - -[source,js] --------- -client.indices.shardStores([params, [callback]]) --------- - -// no description - -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-shards-stores.html[the elasticsearch docs] for more about this method. - -// no examples - - -*Params* - -[horizontal] -`status`:: -`String, String[], Boolean` -- A comma-separated list of statuses used to filter on shards to get store information for -`ignoreUnavailable`:: -`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) -`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) -`[expandWildcards=open]`:: -`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. -Options::: - * `"open"` - * `"closed"` - * `"none"` - * `"all"` - -`operationThreading`:: -`Anything` -- TODO: ? -`index`:: -`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - -link:#[back to top] - -[[api-indices-stats-2-0]] +[[api-indices-stats-1-7]] === `indices.stats` [source,js] @@ -4031,7 +4135,7 @@ client.indices.stats([params, [callback]]) Retrieve statistics on different operations happening on an index. -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-stats.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -4065,7 +4169,50 @@ Options::: link:#[back to top] -[[api-indices-updatealiases-2-0]] +[[api-indices-status-1-7]] +=== `indices.status` + +[source,js] +-------- +client.indices.status([params, [callback]]) +-------- + +Get a comprehensive status information of one or more indices. + +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-status.html[the elasticsearch docs] for more about this method. + +// no examples + + +*Params* + +[horizontal] +`ignoreUnavailable`:: +`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`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) +`[expandWildcards=open]`:: +`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + * `"none"` + * `"all"` + +`human`:: +`Boolean` -- Whether to return time and byte values in human-readable format. +`operationThreading`:: +`Anything` -- TODO: ? +`recovery`:: +`Boolean` -- Return information about shard recovery +`snapshot`:: +`Boolean` -- TODO: ? +`index`:: +`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + +link:#[back to top] + +[[api-indices-updatealiases-1-7]] === `indices.updateAliases` [source,js] @@ -4075,7 +4222,7 @@ client.indices.updateAliases([params, [callback]]) Update specified aliases. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html[the elasticsearch docs] for more about this method. .Perform an atomic alias swap, for a rotating index [source,js] @@ -4103,7 +4250,7 @@ client.indices.updateAliases({ link:#[back to top] -[[api-indices-upgrade-2-0]] +[[api-indices-upgrade-1-7]] === `indices.upgrade` [source,js] @@ -4113,7 +4260,7 @@ client.indices.upgrade([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-upgrade.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-upgrade.html[the elasticsearch docs] for more about this method. // no examples @@ -4134,7 +4281,7 @@ Options::: `ignoreUnavailable`:: `Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) `waitForCompletion`:: -`Boolean` -- Specify whether the request should block until the all segments are upgraded (default: false) +`Boolean` -- Specify whether the request should block until the all segments are upgraded (default: true) `onlyAncientSegments`:: `Boolean` -- If true, only ancient (an older Lucene major release) segments will be upgraded `index`:: @@ -4142,7 +4289,7 @@ Options::: link:#[back to top] -[[api-indices-validatequery-2-0]] +[[api-indices-validatequery-1-7]] === `indices.validateQuery` [source,js] @@ -4152,7 +4299,7 @@ client.indices.validateQuery([params, [callback]]) Validate a potentially expensive query without executing it. -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-validate.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-validate.html[the elasticsearch docs] for more about this method. // no examples @@ -4203,7 +4350,7 @@ Options::: link:#[back to top] -[[api-nodes-hotthreads-2-0]] +[[api-nodes-hotthreads-1-7]] === `nodes.hotThreads` [source,js] @@ -4213,7 +4360,7 @@ client.nodes.hotThreads([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-hot-threads.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-hot-threads.html[the elasticsearch docs] for more about this method. // no examples @@ -4243,7 +4390,7 @@ Options::: link:#[back to top] -[[api-nodes-info-2-0]] +[[api-nodes-info-1-7]] === `nodes.info` [source,js] @@ -4253,7 +4400,7 @@ client.nodes.info([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-info.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-info.html[the elasticsearch docs] for more about this method. // no examples @@ -4274,7 +4421,34 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-shutdown.html[the elasticsearch docs] for more about this method. + +// no examples + + +*Params* + +[horizontal] +`delay`:: +`Date, Number` -- Set the delay for the operation (default: 1s) +`exit`:: +`Boolean` -- Exit the JVM as well (default: true) +`nodeId`:: +`String, String[], Boolean` -- A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes + +link:#[back to top] + +[[api-nodes-stats-1-7]] === `nodes.stats` [source,js] @@ -4284,7 +4458,7 @@ client.nodes.stats([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-stats.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -4322,7 +4496,7 @@ Options::: link:#[back to top] -[[api-snapshot-create-2-0]] +[[api-snapshot-create-1-7]] === `snapshot.create` [source,js] @@ -4332,7 +4506,7 @@ client.snapshot.create([params, [callback]]) // no description -The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4351,7 +4525,7 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4380,7 +4554,7 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4407,7 +4581,7 @@ The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4434,7 +4608,7 @@ The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4461,7 +4635,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4488,7 +4662,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4517,7 +4691,7 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4544,7 +4718,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html[the elasticsearch docs] for more about this method. +The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index 8c0d3754c..b72670799 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -51,7 +51,7 @@ Default in Node::: + WARNING: This default will track the latest version of Elasticsearch, and is only intended to be used during development. It is highly recommended that you set this parameter in all code that is headed to production. -Default ::: `'1.7'` +Default ::: `'2.0'` Options in node ::: * `'2.1'` diff --git a/docs/index.asciidoc b/docs/index.asciidoc index e35d2381c..206168148 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -22,10 +22,10 @@ include::development.asciidoc[] include::api_methods_2_1.asciidoc[] -include::api_methods_2_0.asciidoc[] - include::api_methods.asciidoc[] +include::api_methods_1_7.asciidoc[] + include::api_methods_1_6.asciidoc[] include::api_methods_1_5.asciidoc[] diff --git a/src/lib/apis/browser_index.js b/src/lib/apis/browser_index.js index cc62e5420..23708eb13 100644 --- a/src/lib/apis/browser_index.js +++ b/src/lib/apis/browser_index.js @@ -1,7 +1,7 @@ module.exports = { '2.1': require('./2_1'), + '_default': require('./2_0'), '2.0': require('./2_0'), - '_default': require('./1_7'), '1.7': require('./1_7'), '1.6': require('./1_6'), '1.5': require('./1_5') diff --git a/src/lib/apis/index.js b/src/lib/apis/index.js index 4570035d1..9f227051e 100644 --- a/src/lib/apis/index.js +++ b/src/lib/apis/index.js @@ -1,7 +1,7 @@ module.exports = { '2.1': require('./2_1'), + '_default': require('./2_0'), '2.0': require('./2_0'), - '_default': require('./1_7'), '1.7': require('./1_7'), '1.6': require('./1_6'), '1.5': require('./1_5'), diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index e5f9dd383..6aad4ce26 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -3462,76 +3462,6 @@ api.indices.prototype.open = ca({ method: 'POST' }); -/** - * Perform a [indices.optimize](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-optimize.html) request - * - * @param {Object} params - An object with parameters used to carry out this action - * @param {Boolean} params.flush - Specify whether the index should be flushed after performing the operation (default: true) - * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. - * @param {Number} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic) - * @param {Boolean} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents - * @param {Anything} params.operationThreading - TODO: ? - * @param {Boolean} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true) - * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - */ -api.indices.prototype.optimize = ca({ - params: { - flush: { - type: 'boolean' - }, - ignoreUnavailable: { - type: 'boolean', - name: 'ignore_unavailable' - }, - allowNoIndices: { - type: 'boolean', - name: 'allow_no_indices' - }, - expandWildcards: { - type: 'enum', - 'default': 'open', - options: [ - 'open', - 'closed', - 'none', - 'all' - ], - name: 'expand_wildcards' - }, - maxNumSegments: { - type: 'number', - name: 'max_num_segments' - }, - onlyExpungeDeletes: { - type: 'boolean', - name: 'only_expunge_deletes' - }, - operationThreading: { - name: 'operation_threading' - }, - waitForMerge: { - type: 'boolean', - name: 'wait_for_merge' - } - }, - urls: [ - { - fmt: '/<%=index%>/_optimize', - req: { - index: { - type: 'list' - } - } - }, - { - fmt: '/_optimize' - } - ], - method: 'POST' -}); - /** * Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request * @@ -4847,7 +4777,8 @@ api.nodes.prototype.stats = ca({ 'os', 'process', 'thread_pool', - 'transport' + 'transport', + 'discovery' ] }, indexMetric: { @@ -4892,7 +4823,8 @@ api.nodes.prototype.stats = ca({ 'os', 'process', 'thread_pool', - 'transport' + 'transport', + 'discovery' ] } } @@ -4912,7 +4844,8 @@ api.nodes.prototype.stats = ca({ 'os', 'process', 'thread_pool', - 'transport' + 'transport', + 'discovery' ] }, indexMetric: { @@ -4962,7 +4895,8 @@ api.nodes.prototype.stats = ca({ 'os', 'process', 'thread_pool', - 'transport' + 'transport', + 'discovery' ] } }