File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
server/src/main/java/org/elasticsearch Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -554,6 +554,11 @@ public final void validate(MappingLookup mappers) {
554554 }
555555 }
556556
557+ /**
558+ * This method is separated out to allow subclasses (such as RootObjectMapper) to
559+ * override it and add in additional validations beyond what the mapper.validate()
560+ * method will check on each mapping.
561+ */
557562 protected void validateSubField (Mapper mapper , MappingLookup mappers ) {
558563 mapper .validate (mappers );
559564 }
Original file line number Diff line number Diff line change @@ -554,6 +554,10 @@ public int getTotalFieldsCount() {
554554 return super .getTotalFieldsCount () - 1 + runtimeFields .size ();
555555 }
556556
557+ /**
558+ * Overrides in order to run the namespace validator first and then delegates to the
559+ * standard validateSubField on the parent class
560+ */
557561 @ Override
558562 protected void validateSubField (Mapper mapper , MappingLookup mappers ) {
559563 namespaceValidator .validateNamespace (subobjects (), mapper .leafName ());
Original file line number Diff line number Diff line change @@ -697,7 +697,6 @@ private void construct(
697697
698698 modules .bindToInstance (Tracer .class , telemetryProvider .getTracer ());
699699
700- // serverless deployments plug-in the namespace validator that prohibits mappings with "_project"
701700 RootObjectMapperNamespaceValidator namespaceValidator = pluginsService .loadSingletonServiceProvider (
702701 RootObjectMapperNamespaceValidator .class ,
703702 () -> new DefaultRootObjectMapperNamespaceValidator ()
You can’t perform that action at this time.
0 commit comments