Elasticsearch:我可以安全地删除收缩索引吗?

Elasticsearch: Can i safely delete shrunk index?

我使用 Shrink API 将索引从 500 个分片缩小到 100 个。但似乎在操作完成后没有使用新磁盘 space。

我可以安全地删除具有 500 个分片的原始索引吗?还是新索引依赖于此?

Can i safely delete the original index with 500 shards? or does the new index rely on that?

是的,删除索引不会影响任何其他索引。

But it seems that no new disk space was taken after the operation was complete.

这是意料之中的,至少一开始是这样。 shrink API notes that usually the shrunken index is made by hard-linking 原始索引文件的文档而不是复制它们。硬链接的工作方式与复制非常相似,只是它不占用任何额外的空间 space。特别是,如果您有两个指向相同底层数据的硬链接,那么您可以删除其中一个而不影响另一个,这就是 Elasticsearch 在收缩时使用的 属性。