Prioritize recent content by date

Hi, I'm trying to make newer documents score higher in my search results, similar to this post How to prioritize more recent content? but I'm trying to do it in App Search. I added a proximity boost on the date field centered on "now" but this doesn't seem to make much difference in my results. I still have a document from 1996 scoring above a document from 2021, and even with the boost impact set to 10 I can't get the 2021 document above the 1996 document.

I think I need to make the weight of the date field higher - how do I do this? Or is there a better way to go about getting recent documents to the top of search queries?

Hey hey! So unfortunately, there's a known issue with our recency boosts where the boost decay falls off too quickly. Essentially, the boost you added works, but it only significantly boosts dates within say, the last 2 days or so, and does not boost dates farther away (e.g. a week or more). So I'd definitely expect the results you're seeing, which is dates as far away as a year or more :grimacing:

Apologies for that - it's definitely on our radar to work on ways to tune results more, although I don't know if the recency boost is on our short-term roadmap (I think we actually removed it from our documentation because it wasn't working as expected).

Here's a couple workarounds you could try in the meanwhile:

  • Add the ability to sort by date, and highlight that in your UX
  • Weighting by a specific year cut-off - for example, if you want to boost docs more recent than 2 years ago, you could add a value boost for the sub-2 year docs

Hope that helps, and let me know if the value boost workaround doesn't make sense and I can try to clarify!

1 Like

Hi Constance, thanks for the quick reply. I'm definitely looking forward to when the recency boost works better. Thanks for the suggestions in the mean time.

1 Like

Here's another approach we took to try to solve the same issue:

As a user, I would like to see the most relevant articles appear first. The older an article is (in terms of last update), the less relevant it becomes.

Let's add a new field, called ‘time_decay' that is a number from 0 to ~1.5 which we will use to reduce (or increase) the article score. Articles published on the target date (let’s say 2021-06-30) would get a 1 and as each year goes by, we'd reduce the relevancy by 20%.

0.8 ^ number_of_years_from_target_date = time_decay

Example: if an article is 6 months old from the target date, then time_decay = 0.875
If an article is 2.2 years old from the target date, then time_decay = 0.612

If an article is 3 month PAST the target date then time decay 0.8 ^ -0.25 = 1.057

In App Search we will then multiply the score by the time_decay to prioritize new articles.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.