diff --git a/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequest.java index 8433f406434..9eb3352d999 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequest.java @@ -19,6 +19,7 @@ package org.elasticsearch.action.admin.indices.mapping.put; +import com.carrotsearch.hppc.ObjectOpenHashSet; import org.elasticsearch.ElasticSearchGenerationException; import org.elasticsearch.ElasticSearchIllegalArgumentException; import org.elasticsearch.action.ActionRequestValidationException; @@ -52,6 +53,11 @@ import static org.elasticsearch.common.unit.TimeValue.readTimeValue; */ public class PutMappingRequest extends MasterNodeOperationRequest { + private static ObjectOpenHashSet RESERVED_FIELDS = ObjectOpenHashSet.from( + "_uid", "_id", "_type", "_source", "_all", "_analyzer", "_boost", "_parent", "_routing", "_index", + "_size", "_timestamp", "_ttl" + ); + private String[] indices; private String type; @@ -125,6 +131,9 @@ public class PutMappingRequest extends MasterNodeOperationRequest