How to change popularity_score?

94 Views Asked by At

So Typesense sorts the results by popularity_score. How can I change it? I would like to bump some popularity_scores based on some counters like views, likes, shares. Maybe I should ignore popularity_score that Typesense automatically creates and create my own field which is like a small algorithm based on these counts and sort by that field instead of the popularity_score?

Learn about popularity_score parameters, there isn’t enough documentation on this topic

1

There are 1 best solutions below

1
ErJab On

The popularity_score field in the docs is just an example. Typesense does not auto-calculate it.

Instead you would calculate the score on your side using any criteria and set a field to use for sorting in addition to the text relevance score (which is what Typesense calculates).