Skip to content

Property Casing API Error #9

Description

@chrisjainsley

The line fieldNames.Add(m.Member.Name.ToLowerInvariant()); in MemberProjectionExpressionVisitor.cs seems to convert all property names to lowercase, regardless of whether they are pascal or camel case. It's unclear if the Azure Search API previously permitted varying cases, but it appears to be causing issues now.

A quick solution was to eliminate the ToLowerInvariant() method, but a more robust approach might be to check for the JsonProperty attribute and use it as the default setting. Do you have any thoughts on this? Happy to create a PR with a solution.

"Invalid expression: Could not find a property named 'id' on type 'search.document'.\r\nParameter name: $select"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions