From 2e750d9499c9d227eac1b36b95c3c8d67887e7a6 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 15 Oct 2021 23:47:50 +0800 Subject: [PATCH] fix the 404 error while updating aliases with multiple indices Removing the alias on all related indices should be safe and reasonable even with concurrent operations. This fix should be compatible with Elasticsearch 2.4 and the current version (7.x). --- lib/searchyll/indexer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/searchyll/indexer.rb b/lib/searchyll/indexer.rb index 63884c9..caf5559 100644 --- a/lib/searchyll/indexer.rb +++ b/lib/searchyll/indexer.rb @@ -244,7 +244,7 @@ def finalize_aliases(http) update_aliases.body = { actions: [ { remove: { - index: old_indices.join(','), + index: "*", alias: configuration.elasticsearch_index_base_name } }, { add: {