title: ElasticSearch Nest 2.x - Performance issue, how to disable audit trail?
body: <p>I'm running search queries using Elasticsearch client NEST 2.
  Queries are running fine but inspecting the response I can see that a huge time is spent auditing the query while the ES operation itself is done in a snap.</p>
  
  <p>Here is an example of a request/response :</p>
  
  <blockquote>
    <p>Succesful low level call on POST: /document/ElasticDocument/_search </p>
    
    <p>Audit trail of this API call:
     - HealthyResponse: Node: <a href="http://my-ES-server.com:9200/" rel="nofollow">http://my-ES-server.com:9200/</a> <strong>Took: 00:00:00.3040912</strong><br>
    Request:
    {"from":0,"size":1,"query":{"term":{"Id":{"value":1568}}}}<br>
    Response:
    {<strong>"took":16</strong>,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":9.345218,"hits":[{"_index":"document","_type":"ElasticDocument","_id":"1568","_score":9.345218,"_source":{........}}]}}</p>
  </blockquote>
  
  <p>We can see that the audit took 304ms while the ES search took only 16.</p>
  
  <p>My question is, is there anyway to disable this audit trail or tweak the configuration to effectively improve the performance ?</p>
  
  <p>I had a look at the source code and found out that the audit trail operation is triggered by the ElasticsearchResponse's property DebugInformation but couldn't find how to disable it.</p>
  
  <p>My configuration is pretty straight forward :</p>
  
  <pre><code>var node = new Uri("http://my-ES-server.com:9200/");
  
  var settings = new ConnectionSettings(node);
  
  settings.DefaultIndex("document");
  settings.DefaultTypeNameInferrer(p =&gt; p.Name);
  settings.DefaultFieldNameInferrer(p =&gt; p);
  
  settings.DisableDirectStreaming(); 
  
  this.elasticClient = new ElasticClient(settings);
  </code></pre>
  
  <p>And then my nest call :</p>
  
  <pre><code>var response = this.elasticClient.Search&lt;ElasticDocument&gt;(s =&gt; s
      .Query(q =&gt; q.Term("Id", documentId))
      .From(0)
      .Take(1)
  );
  </code></pre>
  
  <p>For information, when I'm running the queries against a local ES store (populated with same data) audit trail takes ~60ms which is better but still huge comparing to the ES search operation.</p>
  
  <p>Many thanks,</p>
  
  <p>Mickael</p>