[TYPO3-typo3org] Ratings, another try
Michael Scharkow
mscharkow at gmx.net
Tue Apr 4 21:57:37 CEST 2006
Elmar Hinz wrote:
> More simple query: WEIGHTED AVG = $factor * AVG(current) + AVG(all)
>
> Where $factor can be configured or even selected by the user from dropdown.
How is this supposed to ensure the 1-5 scale, sorry I'm bad in math...
Of course, we could do (AVG(current)+AVG(all_incl_current) )/2 but that
would be less weight for the current version than in my initial
proposal, right?
> Why a an extra caching table? Why storing version etc. ?
1. I can't use any other table as the normal extension table is cleared
with every extensions.xml update. I'm just wondering how the download
counter is updated, or is that stored in the XML? Robert?
2. As I wrote: Ratings are bound to versions, and *all* extension lists
on typo3.org basically list specific versions and not extensionkeys
(except the most downloaded view which first computes the most
downloaded extensions and *then* selects the current stable version of
those)
> Not really clever:
>
> WEIGHTED AVG = $factor * AVG(current) + $factor/2 * AVG(last) + AVG(all)
Yes, a lot more byte-moving for little gain, I suspect...
> Encapsulate evaluation for later optimization.
That's the difficulty: If you really want ratings in compact lists, etc.
I need a simple SQL query which in turn means I need to encapsulate the
computation of the weighted average and cache the results.
Greetings,
Michael
More information about the TYPO3-team-typo3org
mailing list