Skip to content

StringFielddataFormat is missing StringEnumConverter attribute #2464

@gilad61

Description

@gilad61

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:

  1. Create some mapping with Fielddata as disabled
field.Fielddata(fd => fd.Format(StringFielddataFormat.Disabled))
  1. Check the actual request that is sent to ES
"fielddata": { "format": 2 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions