mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 09:55:18 +00:00
Scripting the reindex process to dynamically change document ids
This commit is contained in:
parent
fe44b47a2d
commit
d5b4ab9470
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user