Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.15.6 - IPropertyWithClrOrigin replacements? #8337

Open
niemyjski opened this issue Sep 5, 2024 · 0 comments
Open

8.15.6 - IPropertyWithClrOrigin replacements? #8337

niemyjski opened this issue Sep 5, 2024 · 0 comments
Labels
8.x Relates to 8.x client version Category: Question

Comments

@niemyjski
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Relates to 8.x client version Category: Question
Projects
None yet
Development

No branches or pull requests

2 participants