# Prioritize recent content by date

**URL:** <https://discuss.elastic.co/t/prioritize-recent-content-by-date/269483>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [April 7, 2021, 2:27pm UTC](https://discuss.elastic.co/t/prioritize-recent-content-by-date/269483 "2021-04-07T14:27:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bott\_Radio\_Network](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bott_radio_network/32/86110_2.png) [@Bott\_Radio\_Network](https://discuss.elastic.co/u/Bott_Radio_Network)\
**Post date:** [April 7, 2021, 2:27pm UTC](https://discuss.elastic.co/t/prioritize-recent-content-by-date/269483/1 "2021-04-07T14:27:46Z")

</div>

Hi, I'm trying to make newer documents score higher in my search results, similar to this post [How to prioritize more recent content?](https://discuss.elastic.co/t/how-to-prioritize-more-recent-content/134100) 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?

---

<div class="post-metadata">

**Author:** ![constancecchen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/constancecchen/32/71762_2.png) [@constancecchen](https://discuss.elastic.co/u/constancecchen)\
**Post date:** [April 7, 2021, 4:13pm UTC](https://discuss.elastic.co/t/prioritize-recent-content-by-date/269483/2 "2021-04-07T16:13:37Z")

</div>

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 😬

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!

---

<div class="post-metadata">

**Author:** ![Bott\_Radio\_Network](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bott_radio_network/32/86110_2.png) [@Bott\_Radio\_Network](https://discuss.elastic.co/u/Bott_Radio_Network)\
**Post date:** [April 7, 2021, 4:35pm UTC](https://discuss.elastic.co/t/prioritize-recent-content-by-date/269483/3 "2021-04-07T16:35:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![carlblake](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@carlblake](https://discuss.elastic.co/u/carlblake)\
**Post date:** [April 16, 2021, 4:44pm UTC](https://discuss.elastic.co/t/prioritize-recent-content-by-date/269483/4 "2021-04-16T16:44:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 14, 2021, 4:45pm UTC](https://discuss.elastic.co/t/prioritize-recent-content-by-date/269483/5 "2021-05-14T16:45:07Z")

</div>

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