Skip to content

Commit 235be2a

Browse files
Updatig the test in yml
1 parent 37b0bc9 commit 235be2a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
reason: "Update error message for unknown field type"
222222

223223
- do:
224-
catch: /bad_request/
224+
catch: bad_request
225225
indices.create:
226226
index: test_index
227227
body:
@@ -240,7 +240,7 @@
240240
reason: "Update error message for unknown field type"
241241

242242
- do:
243-
catch: /bad_request/
243+
catch: bad_request
244244
indices.create:
245245
index: test_index
246246
body:
@@ -250,7 +250,7 @@
250250
type: invalid
251251

252252
- match: { error.type: "mapper_parsing_exception" }
253-
- match: { error.reason: "The mapper type [invalid] declared on field [content] does not exist. It might have been created within a future version or requires a plugin to be installed. Check the documentation." }
253+
- match: { error.reason: "The mapper type [invalid] declared on runtime field [content] does not exist. It might have been created within a future version or requires a plugin to be installed. Check the documentation." }
254254

255255
---
256256
"Create index with invalid multi-field type":
@@ -259,7 +259,7 @@
259259
reason: "Update error message for unknown field type"
260260

261261
- do:
262-
catch: /bad_request/
262+
catch: bad_request
263263
indices.create:
264264
index: test_index
265265
body:

server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public class MapperFeatures implements FeatureSpecification {
3333
public static final NodeFeature SORT_FIELDS_CHECK_FOR_NESTED_OBJECT_FIX = new NodeFeature("mapper.nested.sorting_fields_check_fix");
3434
public static final NodeFeature DYNAMIC_HANDLING_IN_COPY_TO = new NodeFeature("mapper.copy_to.dynamic_handling");
3535
public static final NodeFeature DOC_VALUES_SKIPPER = new NodeFeature("mapper.doc_values_skipper");
36+
static final NodeFeature UKNOWN_FIELD_MAPPING_UPDATE_ERROR_MESSAGE = new NodeFeature(
37+
"mapper.unknown_field_mapping_update_error_message"
38+
);
3639

3740
@Override
3841
public Set<NodeFeature> getTestFeatures() {
@@ -54,7 +57,7 @@ public Set<NodeFeature> getTestFeatures() {
5457
TSDB_NESTED_FIELD_SUPPORT,
5558
SourceFieldMapper.SYNTHETIC_RECOVERY_SOURCE,
5659
ObjectMapper.SUBOBJECTS_FALSE_MAPPING_UPDATE_FIX,
57-
ObjectMapper.UKNOWN_FIELD_MAPPING_UPDATE_ERROR_MESSAGE,
60+
UKNOWN_FIELD_MAPPING_UPDATE_ERROR_MESSAGE,
5861
DOC_VALUES_SKIPPER
5962
);
6063
}

server/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ public class ObjectMapper extends Mapper {
5050
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(ObjectMapper.class);
5151
public static final FeatureFlag SUB_OBJECTS_AUTO_FEATURE_FLAG = new FeatureFlag("sub_objects_auto");
5252
static final NodeFeature SUBOBJECTS_FALSE_MAPPING_UPDATE_FIX = new NodeFeature("mapper.subobjects_false_mapping_update_fix");
53-
static final NodeFeature UKNOWN_FIELD_MAPPING_UPDATE_ERROR_MESSAGE = new NodeFeature(
54-
"mapper.unknown_field_mapping_update_error_message"
55-
);
5653

5754
public static final String CONTENT_TYPE = "object";
5855
static final String STORE_ARRAY_SOURCE_PARAM = "store_array_source";

0 commit comments

Comments
 (0)