Is it possible to disable versioning?


(T Vinod Gupta) #1

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


(Jasper van Wanrooy - Chatventure) #2

Hi,

For some indices I also don't care about versions of documents. We optimize those indices every day by issuing the optimize call: 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: http://www.elasticsearch.org/guide/reference/api/delete-by-query.html

Cheers, Jasper

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

From: "T Vinod Gupta" tvinod@readypulse.com
To: 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


Versioning of Content
(Ivan Brusic) #3

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 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


(system) #4