4

フィールドの既存のマッピングがあり、それを複数フィールドに変更したいと考えています。

既存のマッピングは

{
   "my_index": {
      "mappings": {
         "my_type": {
            "properties": {
               "author": {
                  "type": "string"
               },
               "isbn": {
                  "type": "string",
                  "analyzer": "standard",
                  "fields": {
                     "ngram": {
                        "type": "string",
                        "search_analyzer": "keyword"
                     }
                  }
               },
               "title": {
                  "type": "string",
                  "analyzer": "english",
                  "fields": {
                     "std": {
                        "type": "string",
                        "analyzer": "standard"
                     }
                  }
               }
            }
         }
      }
   }
}

ドキュメントに基づいて、次のコマンドを実行して「作成者」をマルチフィールドに変更できるはずです

PUT /my_index
{
  "mappings": {
        "my_type": {
            "properties": {
                "author": 
                { 
                    "type": "multi-field",
                    "fields": {
                        "ngram": {
                          "type": "string",
                          "indexanalyzer": "ngram_analyzer",
                          "search_analyzer": "keyword"
                        },
                         "name" : {
                         "type": "string"
                        }
                    }
                }              
            }
        }
    }
}

しかし、代わりに次のエラーが発生します。

{
"error": "IndexAlreadyExistsException[[my_index] already exists]",
"status": 400
}

本当に明らかな何かが欠けていますか?

4

3 に答える 3