# Re: Search on an old version of a record?

**URL:** https://discuss.elastic.co/t/re-search-on-an-old-version-of-a-record/4208
**Category:** Elasticsearch
**Created:** [April 10, 2011, 6:06pm UTC](https://discuss.elastic.co/t/re-search-on-an-old-version-of-a-record/4208 "2011-04-10T18:06:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)
#### Post date: [April 10, 2011, 6:06pm UTC](https://discuss.elastic.co/t/re-search-on-an-old-version-of-a-record/4208/1 "2011-04-10T18:06:52Z")

</div>

Hi,  
I don't think it is possible.  
Lukas  
Dne 10.4.2011 19:50 "Rob Faraj" [rfaraj@gmail.com](mailto:rfaraj@gmail.com) napsal(a):

> Is it possible to get the contents of previous versions of a document?  
> I tried something like this, but it returned the most recent  
> \_version.
> 
> curl -XGET [http://localhost:9200/twitter/tweet/1?version=2](http://localhost:9200/twitter/tweet/1?version=2)

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [April 10, 2011, 7:57pm UTC](https://discuss.elastic.co/t/re-search-on-an-old-version-of-a-record/4208/2 "2011-04-10T19:57:02Z")

</div>

Just verifying what Lukas said, its not possible.  
On Sunday, April 10, 2011 at 9:06 PM, LukÃ¡Å¡ VlÄek wrote:

> Hi,  
> I don't think it is possible.  
> Lukas  
> Dne 10.4.2011 19:50 "Rob Faraj" [rfaraj@gmail.com](mailto:rfaraj@gmail.com) napsal(a):
> 
> > Is it possible to get the contents of previous versions of a document?  
> > I tried something like this, but it returned the most recent  
> > \_version.
> > 
> > curl -XGET [http://localhost:9200/twitter/tweet/1?version=2](http://localhost:9200/twitter/tweet/1?version=2)

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [April 10, 2011, 8:43pm UTC](https://discuss.elastic.co/t/re-search-on-an-old-version-of-a-record/4208/3 "2011-04-10T20:43:50Z")

</div>

You can certainly implement it yourself if you want, i.e. index those changes as documents.  
On Sunday, April 10, 2011 at 11:41 PM, Rob Faraj wrote:

> Thanks. I was thinking about using it to display the a historical view  
> of document changes. Might be handy in troubleshooting situations  
> also. Regardless, just a nice to have.
> 
> On Apr 10, 3:57 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > Just verifying what Lukas said, its not possible.
> > 
> > On Sunday, April 10, 2011 at 9:06 PM, LukÃ¡Å¡ VlÄek wrote:
> > 
> > > Hi,  
> > > I don't think it is possible.  
> > > Lukas  
> > > Dne 10.4.2011 19:50 "Rob Faraj" [rfa...@gmail.com](mailto:rfa...@gmail.com) napsal(a):
> > > 
> > > > Is it possible to get the contents of previous versions of a document?  
> > > > I tried something like this, but it returned the most recent  
> > > > \_version.
> > 
> > > > curl -XGEThttp://localhost:9200/twitter/tweet/1?version=2

---

<div class="post-metadata">

### Author: ![Barsk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/barsk/32/13734_2.png) [@Barsk](https://discuss.elastic.co/u/Barsk)
#### Post date: [April 12, 2011, 7:53am UTC](https://discuss.elastic.co/t/re-search-on-an-old-version-of-a-record/4208/4 "2011-04-12T07:53:56Z")

</div>

Hi Rob,

I was into this pitfall myself. It seems the version attribute is used  
for handling concurrent updates to the record. So it is kind of a  
locking scheme.  
I would have preferred a different name for the attribute to not  
confuse users (myself included :)). If it were named lockid it would be  
more intuitive I think. Just a thought.

Rob Faraj skrev 2011-04-10 19:50:

> Is it possible to get the contents of previous versions of a document?  
> I tried something like this, but it returned the most recent  
> \_version.
> 
> curl -XGET [http://localhost:9200/twitter/tweet/1?version=2](http://localhost:9200/twitter/tweet/1?version=2)

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [April 12, 2011, 9:09am UTC](https://discuss.elastic.co/t/re-search-on-an-old-version-of-a-record/4208/5 "2011-04-12T09:09:31Z")

</div>

Thats how its named in all other systems I know, including optimistic concurrency control with databases.  
On Tuesday, April 12, 2011 at 10:53 AM, Kristian JÃ¶rg wrote:

> Hi Rob,
> 
> I was into this pitfall myself. It seems the version attribute is used  
> for handling concurrent updates to the record. So it is kind of a  
> locking scheme.  
> I would have preferred a different name for the attribute to not  
> confuse users (myself included :)). If it were named lockid it would be  
> more intuitive I think. Just a thought.
> 
> Rob Faraj skrev 2011-04-10 19:50:
> 
> > Is it possible to get the contents of previous versions of a document?  
> > I tried something like this, but it returned the most recent  
> > \_version.
> > 
> > curl -XGET [http://localhost:9200/twitter/tweet/1?version=2](http://localhost:9200/twitter/tweet/1?version=2)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 4:08am UTC](https://discuss.elastic.co/t/re-search-on-an-old-version-of-a-record/4208/6 "2017-07-06T04:08:30Z")

</div>


