I know that I can get all hot question by sorting it like this:


Likewise, I'm not quite sure if other sortings like activity also display hot question.
If so, is there an attribute that I overlooked indicating that it is an hot question?

Now back to my actual question, how to determine if a question is hot?

Is there a formula for calculating the hot question or which is used by the API?

I read this article: What formula should be used to determine “hot” questions? but I don't know if it is the proper formula to calculate a hot question.

Here the formula from the article

(log(Qviews)*4) + ((Qanswers * Qscore)/5) + sum(Ascores)
((QageInHours+1) - ((QageInHours - Qupdated)/2)) ^ 1.5


I've implemented the above formula in Typoscript (code below) along with a custom filter to get all the answers score !-.3J6_-dxUCh.

public questionIsHot(question: IQuestion): boolean {
    if (!question.answers) { return false; }

    const summAnswerScore = question.answers
      .map(answer => answer.score)
      .reduce((accumulator, currentValue) => accumulator + currentValue);

    return (((Math.log(question.view_count) * 4) + ((question.answer_count * question.score) / 5) + summAnswerScore) /
            Math.pow(((this.unixTimestampToHours(question.creation_date) + 1) -
                     ((this.unixTimestampToHours(question.creation_date) - this.unixTimestampToHours(question.last_activity_date))
                     / 2))
                    , 1.5)
            ) > 0;

It generally works, but I'm not sure how to test it to be on the safe side. Also, I come across a strange behavior when I go to the hot tab, not all questions are hot and I do not think this is the intended behavior.



You must log in to answer this question.

Browse other questions tagged .