NEST/Elasticsearch.Net version: 2.x, 5.x, master
Elasticsearch version: 2.x, 5.x
Description of the problem including expected versus actual behavior:
StringFielddataFormat is used to set the format of 'Fielddata' setting in a mapping.
The enum is missing a StringEnumConverter attribute, and as a result the mapping would contain the int value instead of the string value.
For example - fielddata: { format: 2 } instead of fielddata: { format: "disabled" }
ES will not complain about this invalid mapping, but it will just not honor it.
Steps to reproduce:
- Create some mapping with Fielddata as disabled
field.Fielddata(fd => fd.Format(StringFielddataFormat.Disabled))
- Check the actual request that is sent to ES
"fielddata": { "format": 2 }