弹性搜索重建索引。 select 嵌套字段

elasticsearch reindex. select nested fields

是否可以为重建索引设置特定的嵌套字段? 根据文档 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"
      }
    }
POST _reindex 
{
      "source": {
        "index": "twitter",
        "_source": [ "user.name", "user. birthdate", "_doc"]
      },
      "dest": {
        "index": "twitter_new"
      }
    }
}

您需要使用 . 来推荐他们。