Skip to content

8.15.6 - IPropertyWithClrOrigin replacements? #8337

Open
@niemyjski

Description

@niemyjski

Elastic.Clients.Elasticsearch version: 8.15.6

Elasticsearch version: 8.15.1

.NET runtime version: 8.x

Operating system version: Any

Description of the problem including expected versus actual behavior:

We had code in Foundatio.Parsers that merged code mappings with server side mappings and we found a case where coded properties could be null but have a clr name and we used it for that. Is there a good way to replace this?

    // coded properties sometimes have null Name properties
            if (fieldMapping.Name == null && fieldMapping is IPropertyWithClrOrigin clrOrigin && clrOrigin.ClrOrigin != null)
                fieldMapping.Name = new PropertyName(clrOrigin.ClrOrigin);

https://github.com/FoundatioFx/Foundatio.Parsers/blob/main/src/Foundatio.Parsers.ElasticQueries/ElasticMappingResolver.cs#L124-L126

Expected behavior

Being able to resolve coded properties using the clr name.

Reference: FoundatioFx/Foundatio.Parsers#84

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions