Update field mappings template in created index under an alias

爷,独闯天下 提交于 2019-12-11 16:00:14

问题


I have deployed a template in AWS ElasticSearch named users-version-1-order-1, and indexed data under users-all index which is searchable via users alias.

So, all documents are always indexed and updated in users-all, how do I deal with schema change moving forward with applying a new template version? e.g. PUT users-version-2-order-2 and apply it to users-all index.

[UPDATE]

{
  "index_patterns": "users*",
  "order": 6,
  "version": 6,
  "aliases": {
    "users": {}
  },
  "settings": {
    "number_of_shards": 5
  },
  "mappings": {
    "_doc": {
      "dynamic": "strict",
      "properties": {
        "id": { "type": "keyword" },
        "emailAddress": { "type": "keyword" }
      }
    }
  }
}

来源:https://stackoverflow.com/questions/57698644/update-field-mappings-template-in-created-index-under-an-alias

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!