我在 ElasticSearch 中有一个包含映射和数据的现有索引,我需要复制这些索引以测试新开发。无论如何要从已经存在的索引中创建一个临时/重复索引?
来自 SQL 背景,我正在寻找相当于
SELECT *
INTO TestIndex
FROM OriginalIndex
WHERE 1 = 0
我已经尝试过Clone API,但无法让它工作。
我正在尝试使用以下方法进行克隆:
POST /originalindex/_clone/testindex
{
}
但这会导致以下异常:
{
"error": {
"root_cause": [
{
"type": "invalid_type_name_exception",
"reason": "Document mapping type name can't start with '_', found: [_clone]"
}
],
"type": "invalid_type_name_exception",
"reason": "Document mapping type name can't start with '_', found: [_clone]"
},
"status": 400
}
我知道有人会很快指导我。在此先感谢你们所有了不起的人。