Open jbaiera opened 1 year ago
Pinging @elastic/es-search (Team:Search)
The reason you can't set ignore_malformed
on a script field is that scripts are typed, so you can't emit a badly-formed value. I suppose we could change this to just be a warning rather than an error though?
Pinging @elastic/es-storage-engine (Team:StorageEngine)
Mapping parameters are sometimes mutually exclusive on a field. For instance, when mapping a number field with a
script
parameter, if you setignore_malformed
totrue
the mapping fails to create. However,ignore_malformed
is a special parameter which can obtain its default from theindex.mapping.ignore_malformed
setting. Setting the property here does not cause a validation error. If the mapping then attempts to reset the value back to its normal default value, the validation trips and says that the mapping is invalid:fails with the following response:
I'm not sure if there are other cases where parameters preclude other parameters that have dynamic default values. It seems that the parameter validation is more concerned about the parameter (1) existing on the mapping and (2) differing in value from the default, but not (3) that the resulting value is actually compatible.