I need to delete index on specific route.
Following is the way to delete index all. But I am not seeing any way to provide routing in that.
I am using multi tenant using routing. So only one routing index I need to delete when one tenant is deleted.
client.indices.delete({
index: '_all'
}, function(err, res) {
if (err) {
console.error(err.message);
} else {
console.log('Indexes have been deleted!');
}
});
How can we delete all index from only specific routing?
CodePudding user response:
tldr you cannot issue a route in a delete
you can do a delete by query, assuming you have a key you can filter down on, as you cannot provide routing there either
your best bet might be to put the data into user specific indices