# Versions

**URL:** <https://discuss.elastic.co/t/versions/6120>\
**Category:** Elasticsearch\
**Created:** [December 10, 2011, 5:32pm UTC](https://discuss.elastic.co/t/versions/6120 "2011-12-10T17:32:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slava\_G](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Slava\_G](https://discuss.elastic.co/u/Slava_G)\
**Post date:** [December 10, 2011, 5:32pm UTC](https://discuss.elastic.co/t/versions/6120/1 "2011-12-10T17:32:50Z")

</div>

I know that each index operation with same id on the same index is  
generates a new version, is there any  
way to retrieve all version in the search operation ?

Best Regards.

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [December 10, 2011, 5:57pm UTC](https://discuss.elastic.co/t/versions/6120/2 "2011-12-10T17:57:21Z")

</div>

> way to retrieve all version in the search operation ?

what do you mean? There is only one version associated with a  
document. The version field isn't used for 'versioning' purposes ala  
subversion/git it is used for optimistic locking.

Peter.

On 10 Dez., 18:32, slavag [slav...@gmail.com](mailto:slav...@gmail.com) wrote:

> I know that each index operation with same id on the same index is  
> generates a new version, is there any  
> way to retrieve all version in the search operation ?
> 
> Best Regards.

---

<div class="post-metadata">

**Author:** ![Slava\_G](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Slava\_G](https://discuss.elastic.co/u/Slava_G)\
**Post date:** [December 10, 2011, 6:09pm UTC](https://discuss.elastic.co/t/versions/6120/3 "2011-12-10T18:09:50Z")

</div>

Thanks , got it.  
I just thought that may be there previous versions of the document are  
stored as well.

---

<div class="post-metadata">

**Author:** ![Michael\_Sick](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@Michael\_Sick](https://discuss.elastic.co/u/Michael_Sick)\
**Post date:** [December 10, 2011, 11:04pm UTC](https://discuss.elastic.co/t/versions/6120/4 "2011-12-10T23:04:33Z")

</div>

HBase does that type of versioning - you can set the # of versions to keep  
per table and then sync that data with ES.

On Sat, Dec 10, 2011 at 1:09 PM, slavag [slavago@gmail.com](mailto:slavago@gmail.com) wrote:

> Thanks , got it.  
> I just thought that may be there previous versions of the document are  
> stored as well.

---

<div class="post-metadata">

**Author:** ![Slava\_G](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Slava\_G](https://discuss.elastic.co/u/Slava_G)\
**Post date:** [December 11, 2011, 8:00am UTC](https://discuss.elastic.co/t/versions/6120/5 "2011-12-11T08:00:00Z")

</div>

Yes, I know that functionality in HBase, but I wanted to update document  
index and then during search to get all versions of the document from the  
ES.  
Actually I'm not storing data in ES, the one this that is stored it  
reference to the document in some storage. But when document is updated  
then storage has a new version of the document and old as well and then i  
have two references to the storage and wanted to get all of the from the ES.

---

<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, 3:45am UTC](https://discuss.elastic.co/t/versions/6120/6 "2017-07-06T03:45:45Z")

</div>


