|
1 | 1 | /* jshint maxlen: false */ |
2 | 2 |
|
3 | 3 | var ca = require('../client_action').factory; |
4 | | -var proxy = require('../client_action').proxyFactory; |
5 | 4 | var namespace = require('../client_action').namespaceFactory; |
6 | 5 | var api = module.exports = {}; |
7 | 6 |
|
@@ -2728,6 +2727,32 @@ api.indices.prototype.flush = ca({ |
2728 | 2727 | method: 'POST' |
2729 | 2728 | }); |
2730 | 2729 |
|
| 2730 | +/** |
| 2731 | + * Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html) request |
| 2732 | + * |
| 2733 | + * @param {Object} params - An object with parameters used to carry out this action |
| 2734 | + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices |
| 2735 | + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) |
| 2736 | + * @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) |
| 2737 | + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. |
| 2738 | + */ |
| 2739 | +api.indices.prototype.flushSynced = ca({ |
| 2740 | + urls: [ |
| 2741 | + { |
| 2742 | + fmt: '/<%=index%>/_flush/synced', |
| 2743 | + req: { |
| 2744 | + index: { |
| 2745 | + type: 'list' |
| 2746 | + } |
| 2747 | + } |
| 2748 | + }, |
| 2749 | + { |
| 2750 | + fmt: '/_flush/synced' |
| 2751 | + } |
| 2752 | + ], |
| 2753 | + method: 'POST' |
| 2754 | +}); |
| 2755 | + |
2731 | 2756 | /** |
2732 | 2757 | * Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.x/indices-get-index.html) request |
2733 | 2758 | * |
@@ -3825,29 +3850,6 @@ api.indices.prototype.refresh = ca({ |
3825 | 3850 | method: 'POST' |
3826 | 3851 | }); |
3827 | 3852 |
|
3828 | | -/** |
3829 | | - * Perform a [indices.seal](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-seal.html) request |
3830 | | - * |
3831 | | - * @param {Object} params - An object with parameters used to carry out this action |
3832 | | - * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices |
3833 | | - */ |
3834 | | -api.indices.prototype.seal = ca({ |
3835 | | - urls: [ |
3836 | | - { |
3837 | | - fmt: '/<%=index%>/_seal', |
3838 | | - req: { |
3839 | | - index: { |
3840 | | - type: 'list' |
3841 | | - } |
3842 | | - } |
3843 | | - }, |
3844 | | - { |
3845 | | - fmt: '/_seal' |
3846 | | - } |
3847 | | - ], |
3848 | | - method: 'POST' |
3849 | | -}); |
3850 | | - |
3851 | 3853 | /** |
3852 | 3854 | * Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.x/indices-segments.html) request |
3853 | 3855 | * |
@@ -6186,20 +6188,33 @@ api.termvector = ca({ |
6186 | 6188 | required: false |
6187 | 6189 | } |
6188 | 6190 | }, |
6189 | | - url: { |
6190 | | - fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector', |
6191 | | - req: { |
6192 | | - index: { |
6193 | | - type: 'string' |
6194 | | - }, |
6195 | | - type: { |
6196 | | - type: 'string' |
6197 | | - }, |
6198 | | - id: { |
6199 | | - type: 'string' |
| 6191 | + urls: [ |
| 6192 | + { |
| 6193 | + fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector', |
| 6194 | + req: { |
| 6195 | + index: { |
| 6196 | + type: 'string' |
| 6197 | + }, |
| 6198 | + type: { |
| 6199 | + type: 'string' |
| 6200 | + }, |
| 6201 | + id: { |
| 6202 | + type: 'string' |
| 6203 | + } |
| 6204 | + } |
| 6205 | + }, |
| 6206 | + { |
| 6207 | + fmt: '/<%=index%>/<%=type%>/_termvector', |
| 6208 | + req: { |
| 6209 | + index: { |
| 6210 | + type: 'string' |
| 6211 | + }, |
| 6212 | + type: { |
| 6213 | + type: 'string' |
| 6214 | + } |
6200 | 6215 | } |
6201 | 6216 | } |
6202 | | - }, |
| 6217 | + ], |
6203 | 6218 | method: 'POST' |
6204 | 6219 | }); |
6205 | 6220 |
|
@@ -6328,7 +6343,7 @@ api.update = ca({ |
6328 | 6343 | * @param {String} params.index - The name of the index |
6329 | 6344 | * @param {String} params.type - The type of the document |
6330 | 6345 | */ |
6331 | | -api.create = proxy(api.index, { |
| 6346 | +api.create = ca.proxy(api.index, { |
6332 | 6347 | transform: function (params) { |
6333 | 6348 | params.op_type = 'create'; |
6334 | 6349 | } |
|
0 commit comments