Scripting the reindex process to dynamically change document ids

This commit is contained in:
havidarou 2017-12-22 10:20:13 -05:00
parent fe44b47a2d
commit d5b4ab9470

View File

@ -472,13 +472,17 @@ module.exports = (server, options) => {
elasticRequest.callWithInternalUser('indices.delete', { index: ".wazuh" })
.then((data) => {
let configuration = {
"source": {
"index": ".old-wazuh",
"type": "wazuh-configuration"
},
"dest": {
"index": ".wazuh"
}
"source": {
"index": ".old-wazuh",
"type": "wazuh-configuration"
},
"dest": {
"index": ".wazuh"
},
"script": {
"source": "ctx._id = new Date().getTime()",
"lang": "painless"
}
};
server.log([blueWazuh, 'reindex', 'info'], 'Reindexing into the new .wazuh');