From 9ef05d297f9aaa21bf3f47e9431ff45bbaa4f563 Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 26 Aug 2015 09:45:13 -0700 Subject: [PATCH] revert default api back to 1.7, until 2.0 GA is released --- docs/api_methods.asciidoc | 658 ++++++++----- ..._1_7.asciidoc => api_methods_2_0.asciidoc} | 872 +++++++----------- docs/configuration.asciidoc | 2 +- package.json | 2 +- src/lib/apis/2_0.js | 10 + src/lib/apis/master.js | 10 + src/lib/client.js | 2 +- 7 files changed, 790 insertions(+), 766 deletions(-) rename docs/{api_methods_1_7.asciidoc => api_methods_2_0.asciidoc} (87%) diff --git a/docs/api_methods.asciidoc b/docs/api_methods.asciidoc index 386a4566d..7585e3a99 100644 --- a/docs/api_methods.asciidoc +++ b/docs/api_methods.asciidoc @@ -1,5 +1,5 @@ [[api-reference]] -== 2.0 API +== 1.7 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/master/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,14 +52,18 @@ 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 @@ -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/master/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 @@ -98,7 +102,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/master/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] @@ -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/master/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 @@ -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/master/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`:: @@ -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/master/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,6 +395,96 @@ 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` @@ -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/master/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` exits [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/master/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] @@ -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/master/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] @@ -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/master/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 @@ -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/master/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`:: @@ -920,7 +1032,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/master/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,6 +1089,80 @@ 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` @@ -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/master/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 @@ -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/master/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] @@ -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/master/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,20 +1289,12 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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`:: @@ -1355,29 +1533,6 @@ 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/master/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` @@ -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/master/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] @@ -1445,7 +1600,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/master/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] @@ -1534,7 +1689,9 @@ Options::: `String` -- Search operation type Options::: * `"query_then_fetch"` + * `"query_and_fetch"` * `"dfs_query_then_fetch"` + * `"dfs_query_and_fetch"` * `"count"` * `"scan"` @@ -1548,8 +1705,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`:: @@ -1571,8 +1726,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`:: @@ -1747,7 +1902,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/master/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] @@ -1809,17 +1964,17 @@ Options::: link:#[back to top] -[[api-termvectors]] -=== `termvectors` +[[api-termvector]] +=== `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/master/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 @@ -1831,8 +1986,6 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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] @@ -1972,6 +2115,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`:: @@ -2031,7 +2180,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2072,7 +2221,7 @@ Options::: `String, String[], Boolean` -- Comma-separated list of column names to display `help`:: `Boolean` -- Return help information -`[v=true]`:: +`v`:: `Boolean` -- Verbose mode. Display column headers `nodeId`:: `String, String[], Boolean` -- A comma-separated list of node IDs or names to limit the returned information @@ -2089,7 +2238,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/master/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 @@ -2105,7 +2254,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2181,7 +2330,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2219,7 +2368,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/master/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 @@ -2245,7 +2394,7 @@ Options::: `Boolean` -- Return help information `pri`:: `Boolean` -- Set to true to return stats only for primary shards -`[v=true]`:: +`v`:: `Boolean` -- Verbose mode. Display column headers `index`:: `String, String[], Boolean` -- A comma-separated list of index names to limit the returned information @@ -2262,7 +2411,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/master/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 @@ -2278,38 +2427,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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=true]`:: +`v`:: `Boolean` -- Verbose mode. Display column headers link:#[back to top] @@ -2324,7 +2442,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/master/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 @@ -2340,7 +2458,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2371,7 +2489,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2439,7 +2557,7 @@ Options::: `String, String[], Boolean` -- Comma-separated list of column names to display `help`:: `Boolean` -- Return help information -`[v=true]`:: +`v`:: `Boolean` -- Verbose mode. Display column headers `index`:: `String, String[], Boolean` -- A comma-separated list of index names to limit the returned information @@ -2485,7 +2603,7 @@ client.cat.shards([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2501,7 +2619,7 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2578,7 +2696,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/master/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 @@ -2627,7 +2745,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/master/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 @@ -2652,7 +2770,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/master/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 @@ -2679,7 +2797,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/master/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 @@ -2710,7 +2828,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/master/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 @@ -2753,7 +2871,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/master/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 @@ -2780,7 +2898,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/master/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 @@ -2801,7 +2919,7 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2837,8 +2955,16 @@ The default method is `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2910,7 +3036,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/master/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 @@ -2937,7 +3063,7 @@ client.indices.delete([params, [callback]]) Delete an index in Elasticsearch -The default method is `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -2964,7 +3090,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/master/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 @@ -2983,6 +3109,33 @@ 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` @@ -2993,7 +3146,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/master/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 @@ -3020,7 +3173,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/master/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 @@ -3047,7 +3200,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/master/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 @@ -3084,7 +3237,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/master/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 @@ -3123,7 +3276,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/master/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 @@ -3150,7 +3303,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/master/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 @@ -3189,7 +3342,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/master/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 @@ -3263,7 +3416,7 @@ client.indices.get([params, [callback]]) // no description -The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 @@ -3285,10 +3438,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`:: @@ -3306,7 +3455,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/master/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 @@ -3345,7 +3494,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/master/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 @@ -3374,7 +3523,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/master/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 @@ -3417,7 +3566,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/master/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 @@ -3456,7 +3605,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/master/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 @@ -3480,8 +3629,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`:: @@ -3499,7 +3646,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/master/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 @@ -3565,7 +3712,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/master/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 @@ -3606,7 +3753,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/master/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 @@ -3645,7 +3792,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/master/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 @@ -3675,6 +3822,8 @@ 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 @@ -3690,7 +3839,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/master/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 @@ -3719,7 +3868,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/master/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 @@ -3727,6 +3876,8 @@ The default method is `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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 +3950,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/master/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 +3983,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/master/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 @@ -3854,8 +4005,6 @@ Options::: * `"none"` * `"all"` -`requestCache`:: -`Boolean` -- Specify whether the request to be wamred shoyd 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`:: @@ -3904,7 +4053,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/master/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 +4092,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/master/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 @@ -3972,45 +4121,6 @@ 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/master/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` @@ -4021,7 +4131,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/master/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 @@ -4055,6 +4165,49 @@ 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` @@ -4065,7 +4218,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/master/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] @@ -4124,7 +4277,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 +4295,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/master/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 +4356,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/master/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 @@ -4241,7 +4394,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/master/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 @@ -4260,6 +4413,33 @@ 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` @@ -4270,7 +4450,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/master/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 @@ -4316,7 +4496,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/master/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 @@ -4345,7 +4525,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/master/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 @@ -4374,7 +4554,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/master/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 @@ -4401,7 +4581,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/master/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 @@ -4428,7 +4608,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/master/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 @@ -4455,7 +4635,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/master/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 @@ -4482,7 +4662,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/master/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 diff --git a/docs/api_methods_1_7.asciidoc b/docs/api_methods_2_0.asciidoc similarity index 87% rename from docs/api_methods_1_7.asciidoc rename to docs/api_methods_2_0.asciidoc index 8296181b0..6c2c7136b 100644 --- a/docs/api_methods_1_7.asciidoc +++ b/docs/api_methods_2_0.asciidoc @@ -1,11 +1,11 @@ -[[api-reference-1-7]] -== 1.7 API +[[api-reference-2-0]] +== 2.0 API -NOTE: At this time, you must opt into the 1.7 API by setting the `apiVersion` config parameter. +NOTE: At this time, you must opt into the 2.0 API by setting the `apiVersion` config parameter. -[[api-bulk-1-7]] +[[api-bulk-2-0]] === `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/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/master/docs-bulk.html[the elasticsearch docs] for more about this method. .Perform three operations in a single request [source,js] @@ -52,24 +52,20 @@ 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-1-7]] +[[api-clearscroll-2-0]] === `clearScroll` [source,js] @@ -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/master/search-request-scroll.html[the elasticsearch docs] for more about this method. // no examples @@ -92,7 +88,7 @@ The default method is `DELETE` 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/master/search-count.html[the elasticsearch docs] for more about this method. .Get the number of all documents in the cluster [source,js] @@ -191,7 +187,7 @@ Options::: link:#[back to top] -[[api-countpercolate-1-7]] +[[api-countpercolate-2-0]] === `countPercolate` [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/master/search-percolate.html[the elasticsearch docs] for more about this method. // no examples @@ -248,7 +244,7 @@ Options::: link:#[back to top] -[[api-create-1-7]] +[[api-create-2-0]] === `create` [source,js] @@ -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/master/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`:: @@ -327,7 +317,7 @@ Options::: link:#[back to top] -[[api-delete-1-7]] +[[api-delete-2-0]] === `delete` [source,js] @@ -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/master/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,97 +379,7 @@ Options::: link:#[back to top] -[[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]] +[[api-deletescript-2-0]] === `deleteScript` [source,js] @@ -520,7 +414,7 @@ Options::: link:#[back to top] -[[api-deletetemplate-1-7]] +[[api-deletetemplate-2-0]] === `deleteTemplate` [source,js] @@ -553,7 +447,7 @@ Options::: link:#[back to top] -[[api-exists-1-7]] +[[api-exists-2-0]] === `exists` [source,js] @@ -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/master/docs-get.html[the elasticsearch docs] for more about this method. .Check that the document `/myindex/mytype/1` exits [source,js] @@ -604,7 +498,7 @@ client.exists({ link:#[back to top] -[[api-explain-1-7]] +[[api-explain-2-0]] === `explain` [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/master/search-explain.html[the elasticsearch docs] for more about this method. .See how a document is scored against a simple query [source,js] @@ -694,7 +588,7 @@ Options::: link:#[back to top] -[[api-fieldstats-1-7]] +[[api-fieldstats-2-0]] === `fieldStats` [source,js] @@ -737,7 +631,7 @@ Options::: link:#[back to top] -[[api-get-1-7]] +[[api-get-2-0]] === `get` [source,js] @@ -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/master/docs-get.html[the elasticsearch docs] for more about this method. .Get `/myindex/mytype/1` [source,js] @@ -802,7 +696,7 @@ Options::: link:#[back to top] -[[api-getscript-1-7]] +[[api-getscript-2-0]] === `getScript` [source,js] @@ -837,7 +731,7 @@ Options::: link:#[back to top] -[[api-getsource-1-7]] +[[api-getsource-2-0]] === `getSource` [source,js] @@ -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/master/docs-get.html[the elasticsearch docs] for more about this method. // no examples @@ -891,7 +785,7 @@ Options::: link:#[back to top] -[[api-gettemplate-1-7]] +[[api-gettemplate-2-0]] === `getTemplate` [source,js] @@ -924,7 +818,7 @@ Options::: link:#[back to top] -[[api-index-1-7]] +[[api-index-2-0]] === `index` [source,js] @@ -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/master/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`:: @@ -1006,7 +894,7 @@ Options::: link:#[back to top] -[[api-info-1-7]] +[[api-info-2-0]] === `info` [source,js] @@ -1022,7 +910,7 @@ The default method is `GET` 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/master/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,81 +977,7 @@ client.mget({ link:#[back to top] -[[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]] +[[api-mpercolate-2-0]] === `mpercolate` [source,js] @@ -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/master/search-percolate.html[the elasticsearch docs] for more about this method. // no examples @@ -1200,7 +1014,7 @@ Options::: link:#[back to top] -[[api-msearch-1-7]] +[[api-msearch-2-0]] === `msearch` [source,js] @@ -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/master/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] @@ -1249,7 +1063,7 @@ Options::: link:#[back to top] -[[api-mtermvectors-1-7]] +[[api-mtermvectors-2-0]] === `mtermvectors` [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/master/docs-multi-termvectors.html[the elasticsearch docs] for more about this method. // no examples @@ -1289,16 +1103,24 @@ 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/master/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`:: @@ -1437,7 +1259,7 @@ Options::: link:#[back to top] -[[api-ping-1-7]] +[[api-ping-2-0]] === `ping` [source,js] @@ -1453,7 +1275,7 @@ The default method is `HEAD` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/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]] === `scroll` [source,js] @@ -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/master/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] @@ -1586,7 +1431,7 @@ client.search({ link:#[back to top] -[[api-search-1-7]] +[[api-search-2-0]] === `search` [source,js] @@ -1600,7 +1445,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/master/search-search.html[the elasticsearch docs] for more about this method. .Search with a simple query string query [source,js] @@ -1689,9 +1534,7 @@ Options::: `String` -- Search operation type Options::: * `"query_then_fetch"` - * `"query_and_fetch"` * `"dfs_query_then_fetch"` - * `"dfs_query_and_fetch"` * `"count"` * `"scan"` @@ -1705,6 +1548,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`:: @@ -1726,8 +1571,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`:: @@ -1735,7 +1580,7 @@ Options::: link:#[back to top] -[[api-searchexists-1-7]] +[[api-searchexists-2-0]] === `searchExists` [source,js] @@ -1796,7 +1641,7 @@ Options::: link:#[back to top] -[[api-searchshards-1-7]] +[[api-searchshards-2-0]] === `searchShards` [source,js] @@ -1839,7 +1684,7 @@ Options::: link:#[back to top] -[[api-searchtemplate-1-7]] +[[api-searchtemplate-2-0]] === `searchTemplate` [source,js] @@ -1892,7 +1737,7 @@ Options::: link:#[back to top] -[[api-suggest-1-7]] +[[api-suggest-2-0]] === `suggest` [source,js] @@ -1902,7 +1747,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/master/search-suggesters.html[the elasticsearch docs] for more about this method. .Return query terms suggestions (“auto-correction”) [source,js] @@ -1964,17 +1809,17 @@ Options::: link:#[back to top] -[[api-termvector-1-7]] -=== `termvector` +[[api-termvectors-2-0]] +=== `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/master/docs-termvectors.html[the elasticsearch docs] for more about this method. // no examples @@ -1986,6 +1831,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/master/docs-update.html[the elasticsearch docs] for more about this method. .Update document title using partial document [source,js] @@ -2115,12 +1972,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`:: @@ -2154,7 +2005,7 @@ Options::: link:#[back to top] -[[api-cat-aliases-1-7]] +[[api-cat-aliases-2-0]] === `cat.aliases` [source,js] @@ -2180,14 +2031,14 @@ 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/master/cat-allocation.html[the elasticsearch docs] for more about this method. // no examples @@ -2221,14 +2072,14 @@ Options::: `String, String[], Boolean` -- Comma-separated list of column names to display `help`:: `Boolean` -- Return help information -`v`:: +`[v=true]`:: `Boolean` -- Verbose mode. Display column headers `nodeId`:: `String, String[], Boolean` -- A comma-separated list of node IDs or names to limit the returned information link:#[back to top] -[[api-cat-count-1-7]] +[[api-cat-count-2-0]] === `cat.count` [source,js] @@ -2238,7 +2089,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/master/cat-count.html[the elasticsearch docs] for more about this method. // no examples @@ -2254,14 +2105,14 @@ 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/master/cat-health.html[the elasticsearch docs] for more about this method. // no examples @@ -2330,12 +2181,12 @@ 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/master/cat.html[the elasticsearch docs] for more about this method. // no examples @@ -2358,7 +2209,7 @@ 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/master/cat-indices.html[the elasticsearch docs] for more about this method. // no examples @@ -2394,14 +2245,14 @@ Options::: `Boolean` -- Return help information `pri`:: `Boolean` -- Set to true to return stats only for primary shards -`v`:: +`[v=true]`:: `Boolean` -- Verbose mode. Display column headers `index`:: `String, String[], Boolean` -- A comma-separated list of index names to limit the returned information link:#[back to top] -[[api-cat-master-1-7]] +[[api-cat-master-2-0]] === `cat.master` [source,js] @@ -2411,7 +2262,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/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/master/cat-master.html[the elasticsearch docs] for more about this method. // no examples @@ -2427,12 +2278,43 @@ The default method is `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/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=true]`:: +`Boolean` -- Verbose mode. Display column headers + +link:#[back to top] + +[[api-cat-nodes-2-0]] === `cat.nodes` [source,js] @@ -2442,7 +2324,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/master/cat-nodes.html[the elasticsearch docs] for more about this method. // no examples @@ -2458,12 +2340,12 @@ 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/master/cat-pending-tasks.html[the elasticsearch docs] for more about this method. // no examples @@ -2489,12 +2371,12 @@ 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/master/cat-recovery.html[the elasticsearch docs] for more about this method. // no examples @@ -2557,14 +2439,14 @@ Options::: `String, String[], Boolean` -- Comma-separated list of column names to display `help`:: `Boolean` -- Return help information -`v`:: +`[v=true]`:: `Boolean` -- Verbose mode. Display column headers `index`:: `String, String[], Boolean` -- A comma-separated list of index names to limit the returned information link:#[back to top] -[[api-cat-segments-1-7]] +[[api-cat-segments-2-0]] === `cat.segments` [source,js] @@ -2593,7 +2475,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/master/cat-shards.html[the elasticsearch docs] for more about this method. // no examples @@ -2619,14 +2501,14 @@ 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/master/cluster-update-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -2686,7 +2568,7 @@ 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/master/cluster-health.html[the elasticsearch docs] for more about this method. // no examples @@ -2735,7 +2617,7 @@ Options::: link:#[back to top] -[[api-cluster-pendingtasks-1-7]] +[[api-cluster-pendingtasks-2-0]] === `cluster.pendingTasks` [source,js] @@ -2745,7 +2627,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/master/cluster-pending.html[the elasticsearch docs] for more about this method. // no examples @@ -2760,7 +2642,7 @@ 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 `PUT` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -2787,7 +2669,7 @@ The default method is `PUT` 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/master/cluster-reroute.html[the elasticsearch docs] for more about this method. // no examples @@ -2818,7 +2700,7 @@ The default method is `POST` 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/master/cluster-state.html[the elasticsearch docs] for more about this method. // no examples @@ -2861,7 +2743,7 @@ Options::: link:#[back to top] -[[api-cluster-stats-1-7]] +[[api-cluster-stats-2-0]] === `cluster.stats` [source,js] @@ -2871,7 +2753,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/master/cluster-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -2888,7 +2770,7 @@ The default method is `GET` 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/master/indices-analyze.html[the elasticsearch docs] for more about this method. // no examples @@ -2919,7 +2801,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/master/indices-clearcache.html[the elasticsearch docs] for more about this method. // no examples @@ -2955,16 +2837,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/master/indices-open-close.html[the elasticsearch docs] for more about this method. // no examples @@ -3026,7 +2900,7 @@ Options::: link:#[back to top] -[[api-indices-create-1-7]] +[[api-indices-create-2-0]] === `indices.create` [source,js] @@ -3036,7 +2910,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/master/indices-create-index.html[the elasticsearch docs] for more about this method. // no examples @@ -3048,12 +2922,14 @@ 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/master/indices-delete-index.html[the elasticsearch docs] for more about this method. // no examples @@ -3080,7 +2956,7 @@ 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/master/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3109,34 +2985,7 @@ 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]] +[[api-indices-deletetemplate-2-0]] === `indices.deleteTemplate` [source,js] @@ -3146,7 +2995,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/master/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3163,7 +3012,7 @@ 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/master/indices-warmers.html[the elasticsearch docs] for more about this method. // no examples @@ -3190,7 +3039,7 @@ The default method is `DELETE` 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/master/indices-exists.html[the elasticsearch docs] for more about this method. // no examples @@ -3227,7 +3076,7 @@ Options::: link:#[back to top] -[[api-indices-existsalias-1-7]] +[[api-indices-existsalias-2-0]] === `indices.existsAlias` [source,js] @@ -3237,7 +3086,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/master/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3266,7 +3115,7 @@ Options::: link:#[back to top] -[[api-indices-existstemplate-1-7]] +[[api-indices-existstemplate-2-0]] === `indices.existsTemplate` [source,js] @@ -3276,7 +3125,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/master/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3293,7 +3142,7 @@ 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/master/indices-types-exists.html[the elasticsearch docs] for more about this method. // no examples @@ -3332,7 +3181,7 @@ Options::: link:#[back to top] -[[api-indices-flush-1-7]] +[[api-indices-flush-2-0]] === `indices.flush` [source,js] @@ -3342,7 +3191,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/master/indices-flush.html[the elasticsearch docs] for more about this method. // no examples @@ -3371,7 +3220,7 @@ Options::: link:#[back to top] -[[api-indices-flushsynced-1-7]] +[[api-indices-flushsynced-2-0]] === `indices.flushSynced` [source,js] @@ -3406,7 +3255,7 @@ Options::: link:#[back to top] -[[api-indices-get-1-7]] +[[api-indices-get-2-0]] === `indices.get` [source,js] @@ -3416,7 +3265,7 @@ client.indices.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/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/master/indices-get-index.html[the elasticsearch docs] for more about this method. // no examples @@ -3438,6 +3287,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`:: @@ -3445,7 +3298,7 @@ Options::: link:#[back to top] -[[api-indices-getalias-1-7]] +[[api-indices-getalias-2-0]] === `indices.getAlias` [source,js] @@ -3455,7 +3308,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/master/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3484,7 +3337,7 @@ Options::: link:#[back to top] -[[api-indices-getaliases-1-7]] +[[api-indices-getaliases-2-0]] === `indices.getAliases` [source,js] @@ -3494,7 +3347,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/master/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3513,7 +3366,7 @@ 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/master/indices-get-field-mapping.html[the elasticsearch docs] for more about this method. // no examples @@ -3556,7 +3409,7 @@ Options::: link:#[back to top] -[[api-indices-getmapping-1-7]] +[[api-indices-getmapping-2-0]] === `indices.getMapping` [source,js] @@ -3566,7 +3419,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/master/indices-get-mapping.html[the elasticsearch docs] for more about this method. // no examples @@ -3595,7 +3448,7 @@ Options::: link:#[back to top] -[[api-indices-getsettings-1-7]] +[[api-indices-getsettings-2-0]] === `indices.getSettings` [source,js] @@ -3605,7 +3458,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/master/indices-get-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -3629,6 +3482,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`:: @@ -3636,7 +3491,7 @@ Options::: link:#[back to top] -[[api-indices-gettemplate-1-7]] +[[api-indices-gettemplate-2-0]] === `indices.getTemplate` [source,js] @@ -3646,7 +3501,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/master/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3665,7 +3520,7 @@ 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/master/indices-warmers.html[the elasticsearch docs] for more about this method. // no examples @@ -3743,7 +3598,7 @@ Options::: link:#[back to top] -[[api-indices-open-1-7]] +[[api-indices-open-2-0]] === `indices.open` [source,js] @@ -3753,7 +3608,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/master/indices-open-close.html[the elasticsearch docs] for more about this method. // no examples @@ -3782,7 +3637,7 @@ Options::: link:#[back to top] -[[api-indices-optimize-1-7]] +[[api-indices-optimize-2-0]] === `indices.optimize` [source,js] @@ -3792,7 +3647,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/master/indices-optimize.html[the elasticsearch docs] for more about this method. // no examples @@ -3822,14 +3677,12 @@ 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-1-7]] +[[api-indices-putalias-2-0]] === `indices.putAlias` [source,js] @@ -3839,7 +3692,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/master/indices-aliases.html[the elasticsearch docs] for more about this method. // no examples @@ -3858,7 +3711,7 @@ 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/master/indices-put-mapping.html[the elasticsearch docs] for more about this method. // no examples @@ -3876,8 +3729,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/master/indices-update-settings.html[the elasticsearch docs] for more about this method. // no examples @@ -3940,7 +3793,7 @@ Options::: link:#[back to top] -[[api-indices-puttemplate-1-7]] +[[api-indices-puttemplate-2-0]] === `indices.putTemplate` [source,js] @@ -3950,7 +3803,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/master/indices-templates.html[the elasticsearch docs] for more about this method. // no examples @@ -3973,7 +3826,7 @@ 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/master/indices-warmers.html[the elasticsearch docs] for more about this method. // no examples @@ -4005,6 +3858,8 @@ Options::: * `"none"` * `"all"` +`requestCache`:: +`Boolean` -- Specify whether the request to be wamred shoyd 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`:: @@ -4014,7 +3869,7 @@ Options::: link:#[back to top] -[[api-indices-recovery-1-7]] +[[api-indices-recovery-2-0]] === `indices.recovery` [source,js] @@ -4043,7 +3898,7 @@ The default method is `GET` 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/master/indices-refresh.html[the elasticsearch docs] for more about this method. // no examples @@ -4082,7 +3937,7 @@ Options::: link:#[back to top] -[[api-indices-segments-1-7]] +[[api-indices-segments-2-0]] === `indices.segments` [source,js] @@ -4092,7 +3947,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/master/indices-segments.html[the elasticsearch docs] for more about this method. // no examples @@ -4121,7 +3976,46 @@ Options::: link:#[back to top] -[[api-indices-stats-1-7]] +[[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/master/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]] === `indices.stats` [source,js] @@ -4131,7 +4025,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/master/indices-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -4165,50 +4059,7 @@ Options::: link:#[back to top] -[[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]] +[[api-indices-updatealiases-2-0]] === `indices.updateAliases` [source,js] @@ -4218,7 +4069,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/master/indices-aliases.html[the elasticsearch docs] for more about this method. .Perform an atomic alias swap, for a rotating index [source,js] @@ -4246,7 +4097,7 @@ client.indices.updateAliases({ link:#[back to top] -[[api-indices-upgrade-1-7]] +[[api-indices-upgrade-2-0]] === `indices.upgrade` [source,js] @@ -4277,7 +4128,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`:: @@ -4285,7 +4136,7 @@ Options::: link:#[back to top] -[[api-indices-validatequery-1-7]] +[[api-indices-validatequery-2-0]] === `indices.validateQuery` [source,js] @@ -4295,7 +4146,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/master/search-validate.html[the elasticsearch docs] for more about this method. // no examples @@ -4346,7 +4197,7 @@ Options::: link:#[back to top] -[[api-nodes-hotthreads-1-7]] +[[api-nodes-hotthreads-2-0]] === `nodes.hotThreads` [source,js] @@ -4356,7 +4207,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/master/cluster-nodes-hot-threads.html[the elasticsearch docs] for more about this method. // no examples @@ -4384,7 +4235,7 @@ Options::: link:#[back to top] -[[api-nodes-info-1-7]] +[[api-nodes-info-2-0]] === `nodes.info` [source,js] @@ -4394,7 +4245,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/master/cluster-nodes-info.html[the elasticsearch docs] for more about this method. // no examples @@ -4413,34 +4264,7 @@ 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]] +[[api-nodes-stats-2-0]] === `nodes.stats` [source,js] @@ -4450,7 +4274,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/master/cluster-nodes-stats.html[the elasticsearch docs] for more about this method. // no examples @@ -4486,7 +4310,7 @@ Options::: link:#[back to top] -[[api-snapshot-create-1-7]] +[[api-snapshot-create-2-0]] === `snapshot.create` [source,js] @@ -4496,7 +4320,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/master/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4515,7 +4339,7 @@ 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/master/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4544,7 +4368,7 @@ 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 `DELETE` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4571,7 +4395,7 @@ 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/master/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4598,7 +4422,7 @@ 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 `GET` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4625,7 +4449,7 @@ 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/master/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4652,7 +4476,7 @@ 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 `POST` and the usual <> apply. See http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html[the elasticsearch docs] for more about this method. // no examples @@ -4681,7 +4505,7 @@ The default method is `POST` and the usual <