title: Can We Retrieve Previous _source Docs with Elastic Search Versions
body: <p>I've read the blog post on ES regarding <a href="https://www.elastic.co/blog/versioning" rel="nofollow noreferrer">versioning</a>.</p>
  <p>However, I'd like to be able to get the previous <code>_source</code> documents from an update.</p>
  <p>For example, let's say I have this object:</p>
  <pre><code>{
      &quot;name&quot;: &quot;John&quot;,
      &quot;age&quot;: 32,
      &quot;job&quot;: &quot;janitorial technician&quot;
  }
  // this becomes version 1
  </code></pre>
  <p>And I update it to:</p>
  <pre><code>{
      &quot;name&quot;: &quot;John&quot;,
      &quot;age&quot;: 32,
      &quot;job&quot;: &quot;president&quot;
  }
  // this becomes version 2
  </code></pre>
  <p>Then, through versioning in ES, would I be able to get the previous <code>job</code> property of the object?  I've tried this:</p>
  <pre><code>curl -XGET &quot;localhost:9200/index/type/id?version=1&quot;
  </code></pre>
  <p>but that just returns the most up-to-date <code>_source</code> object (the one where John is president).</p>
  <p>I'd actually like to implement a version differences aspect much like StackOverflow does. (BTW, I'm using elastic-search as my main db - if there's a way to do this with other NoSQL databases, I'd be happy to try it out. Preferably, one that integrates well with ES.)</p>