Skip to content

MapFromAttributes ignores FieldType.Completion #949

@sven-h

Description

@sven-h

Hi everyone,

while working with NEST Version 1.0.2, I think I found a small mistake when using AddMapping(m => m.MapFromAttributes()) with an Property of type Completion like

[ElasticProperty(Type = FieldType.Completion)]
public string Autocomplete { get; set; }

There might be missing a case block for "completion" in file src/Nest/Resolvers/Converters/ElasticTypeConverter.cs method GetTypeFromJObject.
My proposal is another catch block

case "completion":
    return serializer.Deserialize(po.CreateReader(), typeof(CompletionMapping)) as CompletionMapping;

but I don't have the full overview of the project, so this is only a guess.

Best regards
Sven

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