[英]What happens to the data in the original index after reindexing in elasticsearch?
In an elasticsearch instance, I have data in an index "a".在 elasticsearch 实例中,我在索引“a”中有数据。 I want to copy all data within a period (say Aug 2021 to September 2021) to another index "b".
我想将一段时间内(例如 2021 年 8 月至 2021 年 9 月)内的所有数据复制到另一个索引“b”。 I apply reindex in the following manner:
我以下列方式应用重新索引:
POST _reindex
{
"source": {
"index": "a",
"query": {
"range": {
"created": {
"gte": "2021-08-01 00:00:00.000",
"lt": "2021-09-01 00:00:00.000"
}
}
}
},
"dest": {
"index": "b"
}
}
Now, if I decide to delete the index "b", what happens to the data that I just moved?现在,如果我决定删除索引“b”,我刚刚移动的数据会发生什么? Does it still stay in index "a"?
它仍然停留在索引“a”中吗?
Yes, the reindex operation leaves the source index untouched.是的,重新索引操作使源索引保持不变。 After the reindex is done, you have two indexes
a
and b
and you can decide to do whatever you want with them.重新索引完成后,您有两个索引
a
和b
,您可以决定对它们做任何您想做的事情。
If you're happy with the data in index b
you can decide to remove index a
, if you're not, you can delete b
, keep a
and re-attempt another reindex.如果您对索引
b
中的数据感到满意,您可以决定删除索引a
,如果不满意,您可以删除b
,保留a
并重新尝试另一个重新索引。
It's up to you to do whatever you want.做任何你想做的事都取决于你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.