grahamjenson / hapiger

HapiGer is an http-wrapper around the Good Enough Recommendation engine using the Hapi.js framework
174 stars 36 forks source link

Does expired recommendations gets automatically cleaned up from the db? #19

Closed abejoe closed 6 years ago

abejoe commented 6 years ago

I just wanted to know does expired recommendations gets automatically cleaned up form the database. In my use case, recommendations gets fed based on user activity. So I'm expecting recommendations will be fed in massive amounts. I have also set a two week expiry for recommendations.

My concern is the presence of expired/redundant recommendations in the db. I have validated that expired recommendations does not affect the present recommendations but simply the presence of data in the db may affect the performance.

Has removal of redundant data been automated or should I do it from my part?

grahamjenson commented 6 years ago

Hey,

The expired events will be removed when Compacting. This will kick off a few database tasks making everything faster and should be done regularly.

abejoe commented 6 years ago

I have a few queries, 1) Is it possible to set the expiry along with the time? If so please show an example for the same. 2) How exactly does the numbering for 'like and dislike' works while getting recommendation?

grahamjenson commented 6 years ago
  1. The last Example here shows how to set the expiry time
  2. Hapiger uses Cosign Similarity to determine the distance between recommendations
abejoe commented 6 years ago

The last example mentions expiry with date and by default, it get sets at 00:00:00 of that day. I would like to know if its possible to set the expiry date along with the 'time'?