By default, NEST will camel case object and property names when sending an object to Elasticsearch for indexing. How can camel casing field names be disabled in NEST for Elasticsearch documents? I've done a fair amount of research and there's a mailing list thread on the subject, but it seems outdated as some of the methods have been renamed or no longer exist.
IConnectionPool connectionPool = new SniffingConnectionPool(m_ElasticsearchNodeUris);
ConnectionSettings settings = new ConnectionSettings(connectionPool);
settings.SetDefaultTypeNameInferrer(p => p.Name); //This disables camel casing for object type names
ElasticClient client = new ElasticClient(settings);
The info in the mailing list indicates this code should be added to handle things for field names, but the client method doesn't seem to exist:
client.ModifyJsonSerializationSettings(s => s.ContractResolver = new Nest.Resolvers.ElasticResolver(settings);
Does anyone have any updated syntax to handle this? Thanks.