I've read the blog post on ES regarding versioning.
However, I'd like to be able to get the previous _source
documents from an update.
For example, let's say I have this object:
{
"name": "John",
"age": 32,
"job": "janitorial technician"
}
// this becomes version 1
And I update it to:
{
"name": "John",
"age": 32,
"job": "president"
}
// this becomes version 2
Then, through versioning in ES, would I be able to get the previous job
property of the object? I've tried this:
curl -XGET "localhost:9200/index/type/id?version=1"
but that just returns the most up-to-date _source
object (the one where John is president).
I'd actually like to implement a version differences aspect much like StackOverflow does. (BTW, I'm using elastic-search as my main db - if there's a way to do this with other NoSQL databases, I'd be happy to try it out. Preferably, one that integrates well with ES.)