elastic/elasticsearch

Detect when copying to a non-existent field when dynamic mappings are disabled

Open

#112,812 建立於 2024年9月12日

在 GitHub 查看
 (20 留言) (0 反應) (0 負責人)Java (76,700 star) (25,882 fork)batch import
:Search Foundations/Mapping:Search Relevance/Search>enhancementTeam:Search FoundationsTeam:Search Relevancegood first issue

描述

Description

We should be able to detect when a user is attempting to use copy_to to copy to a non-existent field when dynamic mappings are disabled. For example:

PUT test-index
{
  "mappings": {
    "dynamic": false,
    "properties": {
      "test_field": {
        "type": "text",
        "copy_to": "missing_field"
      }
    }
  }
}

Currently, this request succeeds even though nothing will ever be copied to missing_field. We should throw a 400 error in this case to indicate to the user that their mappings are invalid.

貢獻者指南

Detect when copying to a non-existent field when dynamic mappings are disabled · elastic/elasticsearch#112812 | Good First Issue