Custom ranking by a function


I want to rank my results based on a custom mathematical function, which should be calculated “on the fly” (basically, I want to derank older entries, with a logarithmic filter). What is the best way to do this without having to constantly refresh my index to periodically adjust the value as a fixed value? Is that even possible?

Hi @J0sh, you can make the calculations before you index with Algolia and store the value in the index, or you can make the calculation after you’ve retrieved the data from the index. Algolia does not have any type of calculation or dynamic fields.

That is a great pity. If I calculate the whole thing after I fetched the data from algolia, I can directly implement my own search function.

In principle, I would like to filter the data according to topicality, and at the same time “boost” frequently visited entries. But that is probably not possible. Then I’ll see what alternatives I have and whether it still makes sense to use Algolia.

Thanks anyways! :slight_smile: