I'm newbie to Elasticsearch and I'm wondering about the best way to model this requirement in Elasticsearch: we need to keep the modification history of an object like this:
example{
id;
name;
type;
}
So far, we've followed this approach: every time the object is modified, a new document is inserted into Elasticsearch. I also need to create ratio metrics on the type within a period, considering only the last document of each object within that period, based on a date field added to the object. This makes the query complicated and involves several sub-aggregations.