title: Elasticsearch - Default Field Name Inferrer
body: <p>In 2.0 alpha for nest I am struggling to set the <code>DefaultFieldNameInferrer</code> to camelCase.</p>
  
  <p>After figuring out how to view the 'request body' (by explicity setting the <code>DisableDirectStreaming</code> to true, despite the default is true...), I can see that for a request like:</p>
  
  <p><code>...fil.Bool(b2 =&gt; b2.Must(m =&gt; m.Term(t =&gt; t.DomainName, host))))...</code></p>
  
  <p>it is sending <code>DomainName</code> with a captial <code>D</code>:</p>
  
  <p><code>...{"term":{"DomainName":{"value":"example.com"}}}]}...</code></p>
  
  <p>Version 1.7 always sent camelCase and hence my mappings are all camelCase.</p>
  
  <p>How can I change this back to camelCase?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Connection:</p>
  
  <pre><code>ElasticClient = new ElasticClient
              (new ConnectionSettings(new Uri(WebConfigMethods.GetElasticSearchUri())).MapDefaultTypeIndices
                   (new ElasticsearchMethods().ElasticSearchDefaultTypeIndices)
                                                                                      .DisableDirectStreaming(true)
                                                                                      .DefaultFieldNameInferrer
                   (s =&gt;
                       {
                           if (string.IsNullOrEmpty(s))
                               return s;
  
                           if (!char.IsUpper(s[0]))
                               return s;
  
                           string camelCase = char.ToLower(s[0], CultureInfo.InvariantCulture)
                                                  .ToString(CultureInfo.InvariantCulture);
                           if (s.Length &gt; 1)
                               camelCase += s.Substring(1);
  
                           return camelCase;
                       }));
  </code></pre>
  
  <p>Request:</p>
  
  <pre><code>var result = elasticClient.Search&lt;ADocType&gt;
                  (s =&gt; s.Take(1)
                         .Query
                            (qu =&gt;
                             qu.Bool
                                 (b =&gt; b.Filter(fil =&gt; fil.Bool(b2 =&gt; b2.Must(m =&gt; m.Term(t =&gt; t.DomainName, host)))))));
  </code></pre>
  
  <p>What nest actually sends:</p>
  
  <pre><code>{"size":1,"query":{"bool":{"filter":[{"bool":{"must":[{"term":{"DomainName":{"value":"example.com"}}}]}}]}}}
  </code></pre>