Nest converts first letter of field to lowercase in query

(James) #1

NEST converts the first letter of the field name to lowercase??? See the code below. Why does NEST translate "SceneText" into "sceneText"?

                var searchResponse = _EsClientDAL.Current.Search<DTO.RiAll>(s => s
                    .Query(q => q
                    .Match(m => m
                        .Field(f => f.SceneText)

Valid NEST response built from a successful low level call on POST: /ri/RiAll/_search

Audit trail of this API call:





(Russ Cam) #2

This is not an issue but expected behaviour.

By default, NEST camel cases the property names on the POCO when serializing the POCO into a JSON document to send to Elasticsearch. You can change this behaviour by using the .DefaultFieldNameInferrer(Func<string,string>) method on ConnectionSettings. Take a look at the documentation for more details.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.