Search sort by popularity for the last 7 days

I wonder if it’s possible to filter results by popularity for the last 7 days (for example). My index deals with the already global popularity field. The Analytics page from Algolia displays something similar, where you display the trendy results

Hi @lamarque.matthieu

Do you mean filter to popular products that have been added in the last 7 days, or the most popular products over the last 7 days?

If it’s by date added, you could accomplish this with an additional date filter on the search.

For “most popular over the last 7 days” you’d need to calculate this and inject it as another field. Then you could use it as either an additional filter or a ranking criteria.

If you are sending us conversion events (and you should be!), an alternative approach would be to use Recommend’s Trending models to dynamically show the most popular products across either the whole catalog or within a category.