Is there any way to retrieve older version of same document in elasticsearch? Suppose I've indexed 1 document in ES:
put class/student/1
{
"marks":95
}
Later point of time I want to update it to:
put class/student/1
{
"marks":96
}
As soon as I index the updated marks, I see '_version' getting updated as 2. Is there any way to query ES and get _version=1 document?
This is not possible. Even though there is a version number associated with each create/index/update/delete operation, this version number can't be used to retrieve the older version of the document. Rather it can be used to prevent dirty reads while read/manipulate/index operations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With