Add Timestamp to each document added in ElasticSearch - Nest 2.0
<p>How can I make sure each document indexed in elasticsearch gets timestamped?</p>

<pre><code>        node = new Uri("http://localhost:9201);
        settings =
            new ConnectionSettings(node).DefaultIndex("mytestindex");
        elasticClient = new ElasticClient(settings);

// Then I do
elasticClient.Index(connections, idx =&gt; idx.Id("1")
</code></pre>

<ol>
<li>Using NEST and C# how can I make sure each document I index gets timestamp?</li>
<li>How can I query for all documents of type <code>&lt;MyDoc&gt;</code> with older than an hour ago?</li>
</ol>

<p>I found this: <a href="https://stackoverflow.com/questions/27533368/adding-timestamp-to-each-document-added-in-elasticsearch">Adding Timestamp to each document added in ElasticSearch</a>
however it doesn't show me how to do this with NEST</p>

<p>I've tried this, however looking at the result timestamp is null and it returns all documents in index:</p>

<pre><code>        var test =
            elasticClient.Search&lt;MyDoc&gt;(
                s =&gt; s.Query(q =&gt; q.DateRange(x =&gt; x.LessThan(DateTime.Now.AddHours(-1)))));
</code></pre>