# Is it possible to disable versioning?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-disable-versioning/6750>\
**Category:** Elasticsearch\
**Created:** [February 19, 2012, 8:44pm UTC](https://discuss.elastic.co/t/is-it-possible-to-disable-versioning/6750 "2012-02-19T20:44:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![T\_Vinod\_Gupta](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@T\_Vinod\_Gupta](https://discuss.elastic.co/u/T_Vinod_Gupta)\
**Post date:** [February 19, 2012, 8:44pm UTC](https://discuss.elastic.co/t/is-it-possible-to-disable-versioning/6750/1 "2012-02-19T20:44:10Z")

</div>

in my use case, i don't really care about the versions of a document. i  
only care about the latest version. so i was wondering if its a good idea  
to disable it so that i save on space overhead of multiple versions? if so,  
how do i go about it?

also, is there an api to purge all documents older than a certain  
timestamp? i saw that with each document, you can associate a ttl but i  
don't want to pre-commit myself to it at the time of document indexing.  
instead, i want to be able to do it in an adhoc manner.

thanks

---

<div class="post-metadata">

**Author:** ![Jasper\_van\_Wanrooy\_C](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasper_van_wanrooy_c/32/2494_2.png) [@Jasper\_van\_Wanrooy\_C](https://discuss.elastic.co/u/Jasper_van_Wanrooy_C)\
**Post date:** [February 19, 2012, 9:39pm UTC](https://discuss.elastic.co/t/is-it-possible-to-disable-versioning/6750/2 "2012-02-19T21:39:26Z")

</div>

Hi,

For some indices I also don't care about versions of documents. We optimize those indices every day by issuing the optimize call: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-optimize.html)  
About the removal of irrelevant documents you can use the "delete by query" API. See here: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/delete-by-query.html)

Cheers, Jasper

----- Original Message -----

> From: "T Vinod Gupta" [tvinod@readypulse.com](mailto:tvinod@readypulse.com)  
> To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> Sent: Sunday, February 19, 2012 9:44:10 PM  
> Subject: is it possible to disable versioning?

> in my use case, i don't really care about the versions of a document.  
> i only care about the latest version. so i was wondering if its a  
> good idea to disable it so that i save on space overhead of multiple  
> versions? if so, how do i go about it?

> also, is there an api to purge all documents older than a certain  
> timestamp? i saw that with each document, you can associate a ttl  
> but i don't want to pre-commit myself to it at the time of document  
> indexing. instead, i want to be able to do it in an adhoc manner.

> thanks

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [February 20, 2012, 12:32am UTC](https://discuss.elastic.co/t/is-it-possible-to-disable-versioning/6750/3 "2012-02-20T00:32:06Z")

</div>

Elasticsearch does not retain previous version of a document, it  
merely keeps track of the revision number. Any search/get query will  
return the latest version.

If you do not want to use the TTL feature, you can always supply your  
own timestamp and execute a delete by (range) query.

--  
Ivan

On Sun, Feb 19, 2012 at 12:44 PM, T Vinod Gupta [tvinod@readypulse.com](mailto:tvinod@readypulse.com) wrote:

> in my use case, i don't really care about the versions of a document. i only  
> care about the latest version. so i was wondering if its a good idea to  
> disable it so that i save on space overhead of multiple versions? if so, how  
> do i go about it?
> 
> also, is there an api to purge all documents older than a certain timestamp?  
> i saw that with each document, you can associate a ttl but i don't want to  
> pre-commit myself to it at the time of document indexing. instead, i want to  
> be able to do it in an adhoc manner.
> 
> thanks

---

<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:38am UTC](https://discuss.elastic.co/t/is-it-possible-to-disable-versioning/6750/4 "2017-07-06T03:38:49Z")

</div>


