diff --git a/docs/api_methods_2_0.asciidoc b/docs/api_methods_2_0.asciidoc index d70f9e692..4aae557c4 100644 --- a/docs/api_methods_2_0.asciidoc +++ b/docs/api_methods_2_0.asciidoc @@ -1678,9 +1678,9 @@ Options::: * `"all"` `index`:: -`String` -- The name of the index +`String, String[], Boolean` -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices `type`:: -`String` -- The type of the document +`String, String[], Boolean` -- A comma-separated list of document types to search; leave empty to perform the operation on all types link:#[back to top] @@ -3238,8 +3238,6 @@ The default method is `POST` and the usual </_flush/synced', @@ -5395,8 +5416,8 @@ api.searchExists = ca({ * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. - * @param {String} params.index - The name of the index - * @param {String} params.type - The type of the document + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types */ api.searchShards = ca({ params: { @@ -5434,10 +5455,10 @@ api.searchShards = ca({ fmt: '/<%=index%>/<%=type%>/_search_shards', req: { index: { - type: 'string' + type: 'list' }, type: { - type: 'string' + type: 'list' } } }, @@ -5445,7 +5466,7 @@ api.searchShards = ca({ fmt: '/<%=index%>/_search_shards', req: { index: { - type: 'string' + type: 'list' } } }, diff --git a/src/lib/apis/2_x.js b/src/lib/apis/2_x.js index abcd66f43..fb470e78f 100644 --- a/src/lib/apis/2_x.js +++ b/src/lib/apis/2_x.js @@ -2605,12 +2605,33 @@ api.indices.prototype.flush = ca({ * Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html) request * * @param {Object} params - An object with parameters used to carry out this action - * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices */ api.indices.prototype.flushSynced = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, urls: [ { fmt: '/<%=index%>/_flush/synced', @@ -5395,8 +5416,8 @@ api.searchExists = ca({ * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. - * @param {String} params.index - The name of the index - * @param {String} params.type - The type of the document + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types */ api.searchShards = ca({ params: { @@ -5434,10 +5455,10 @@ api.searchShards = ca({ fmt: '/<%=index%>/<%=type%>/_search_shards', req: { index: { - type: 'string' + type: 'list' }, type: { - type: 'string' + type: 'list' } } }, @@ -5445,7 +5466,7 @@ api.searchShards = ca({ fmt: '/<%=index%>/_search_shards', req: { index: { - type: 'string' + type: 'list' } } }, diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index a39db9826..00ce83072 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -2605,12 +2605,33 @@ api.indices.prototype.flush = ca({ * Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html) request * * @param {Object} params - An object with parameters used to carry out this action - * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices */ api.indices.prototype.flushSynced = ca({ + params: { + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed', + 'none', + 'all' + ], + name: 'expand_wildcards' + } + }, urls: [ { fmt: '/<%=index%>/_flush/synced', @@ -5391,8 +5412,8 @@ api.searchExists = ca({ * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. - * @param {String} params.index - The name of the index - * @param {String} params.type - The type of the document + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types */ api.searchShards = ca({ params: { @@ -5430,10 +5451,10 @@ api.searchShards = ca({ fmt: '/<%=index%>/<%=type%>/_search_shards', req: { index: { - type: 'string' + type: 'list' }, type: { - type: 'string' + type: 'list' } } }, @@ -5441,7 +5462,7 @@ api.searchShards = ca({ fmt: '/<%=index%>/_search_shards', req: { index: { - type: 'string' + type: 'list' } } },