Update score based on age

Request new functionality here
avanc
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 06 Apr 2017, 11:26

Update score based on age

Postby avanc » 06 Apr 2017, 11:41

Hello,

it would be great if filters can also be based on the age of an article to change the score. I know this means that the the score has to be calculated on a regular basis, not only once on import. Purge after x days does not work for me, as some articles are still interesting after that peroid of time. Some short example:
  • Daily news feed: Not intersting anymore after a few days
  • Security feeds of a software: Still of interest after several weeks

I'm not sure if it is actually a feature request or if I just missed the feature.

Sven

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Update score based on age

Postby fox » 06 Apr 2017, 12:08

this sounds like something best delegated to a specialized plugin

avanc
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 06 Apr 2017, 11:26

Re: Update score based on age

Postby avanc » 07 Apr 2017, 12:56

Thanks.
Which hook would be the best to do the task? How about HOOK_UPDATE_TASK or HOOK_HOUSE_KEEPING? Which one is executed more often?

Can you give me some hints how to query all articles and update the score? Some keywords or references to source code would be a good starting point.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Update score based on age

Postby fox » 07 Apr 2017, 13:47

i suggest you update scores in house keeping, update task might be executed simultaneously on multiple threads. i also suggest you use batching.

rest of your questions should be immediately obvious from the database schema alone so i think you should take a look there.

avanc
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 06 Apr 2017, 11:26

Re: Update score based on age

Postby avanc » 07 Apr 2017, 14:13

Thanks again.
One last question before diving into coding: What do you mean with batching?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Update score based on age

Postby fox » 07 Apr 2017, 14:29

there could be potentially millions of articles in the database, you need to process them in some discrete amounts as to not hog the database and update processes.


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 1 guest