是否可以为重新索引设置特定的嵌套字段?根据文档https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-filter-source,选定的字段是数组。
POST _reindex
{
"source": {
"index": "twitter",
"_source": ["user", "_doc"]
},
"dest": {
"index": "new_twitter"
}
}
例如,我们只需要重新索引用户的嵌套字段,如“姓名”和“生日”:怎么做?我们需要这样的东西:
POST _reindex
{
"source": {
"index": "twitter",
"_source": { "user": ["name", "birthdate"], "_doc"]
},
"dest": {
"index": "new_twitter"
}
}