Adding autocomplete rules for reindex API to Console (#10150)
* Adding autocomplete rules for reindex API * Fixing defaults to match spec * Adding the slices parameter * Moving pipeline to it's rightful place
This commit is contained in:
parent
f94859857e
commit
7b2874d518
|
@ -16,6 +16,7 @@ let parts = [
|
|||
require('./es_5_0/mappings'),
|
||||
require('./es_5_0/percolator'),
|
||||
require('./es_5_0/query'),
|
||||
require('./es_5_0/reindex'),
|
||||
require('./es_5_0/snapshot_restore'),
|
||||
require('./es_5_0/search'),
|
||||
require('./es_5_0/settings'),
|
||||
|
|
57
src/core_plugins/console/api_server/es_5_0/reindex.js
Normal file
57
src/core_plugins/console/api_server/es_5_0/reindex.js
Normal file
|
@ -0,0 +1,57 @@
|
|||
module.exports = function (api) {
|
||||
|
||||
api.addEndpointDescription('_post_reindex', {
|
||||
methods: [ 'POST' ],
|
||||
patterns: [
|
||||
'_reindex'
|
||||
],
|
||||
url_params: {
|
||||
refresh: '__flag__',
|
||||
wait_for_completion: 'true',
|
||||
wait_for_active_shards: 1,
|
||||
timeout: '1m',
|
||||
requests_per_second: 0,
|
||||
slices: 1
|
||||
},
|
||||
data_autocomplete_rules: {
|
||||
__template: {
|
||||
'source': {},
|
||||
'dest': {}
|
||||
},
|
||||
'source': {
|
||||
'index': '',
|
||||
'type': '',
|
||||
'query': {
|
||||
__scope_link: 'GLOBAL.query'
|
||||
},
|
||||
'sort': {
|
||||
__template: {
|
||||
'FIELD': 'desc'
|
||||
},
|
||||
'FIELD': { __one_of: [ 'asc', 'desc' ] }
|
||||
},
|
||||
'size': 1000,
|
||||
'remote': {
|
||||
__template: {
|
||||
'host': '',
|
||||
},
|
||||
'host': '',
|
||||
'username': '',
|
||||
'password': '',
|
||||
'socket_timeout': '30s',
|
||||
'connect_timeout': '30s'
|
||||
}
|
||||
},
|
||||
'dest': {
|
||||
'index': '',
|
||||
'version_type': { __one_of: [ 'internal', 'external' ] },
|
||||
'op_type': 'create',
|
||||
'routing': { __one_of: [ 'keep', 'discard', '=SOME TEXT'] },
|
||||
'pipeline': ''
|
||||
},
|
||||
'conflicts': 'proceed',
|
||||
'size': 10,
|
||||
'script': { __scope_link: 'GLOBAL.script' },
|
||||
}
|
||||
})
|
||||
};
|
Loading…
Reference in a new issue