We have a document in ES called the Opportunity document. This opportunity document contains an activity array that has all the calls and emails associated with that opportunity and their size. I am also computing the last two-week activity score (sum of all call sizes and email sizes that happened in the last 14 days) to enable users to sort by this score.
But, in order to keep the two-week activity score fresh, I need to update all opportunities every day. This will involve too much overhead. Is there a way to compute this on the fly in Elastic Search and sort or a better design maybe?
Aucun commentaire:
Enregistrer un commentaire