# Recency Boost on date field containing nulls

**URL:** <https://discuss.elastic.co/t/recency-boost-on-date-field-containing-nulls/349170>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [December 12, 2023, 3:57pm UTC](https://discuss.elastic.co/t/recency-boost-on-date-field-containing-nulls/349170 "2023-12-12T15:57:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brad\_Hall](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brad_hall/32/121797_2.png) [@Brad\_Hall](https://discuss.elastic.co/u/Brad_Hall)\
**Post date:** [December 12, 2023, 3:57pm UTC](https://discuss.elastic.co/t/recency-boost-on-date-field-containing-nulls/349170/1 "2023-12-12T15:57:18Z")

</div>

Hi,  
I have an issue with an App Search engine where I'm attempting to apply a recency boost on a date field. Some of the documents in the engine do not have values for the date field and they are boosted to the top of the results.

It appears that the null valued documents are defaulted with the current date/time for calculating the boost value.

**Relevance Tuning for field**  
Boost  
**Function** : Linear  
**Center** : now  
**Impact** : 9.3

Is there a way to prevent documents without a date from being boosted as if they had today's date?

---

<div class="post-metadata">

**Author:** ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)\
**Post date:** [December 15, 2023, 3:01pm UTC](https://discuss.elastic.co/t/recency-boost-on-date-field-containing-nulls/349170/2 "2023-12-15T15:01:06Z")

</div>

Hi @Brad_Hall

Unfortunately its not possible to do this and requires all documents to have the field value. Not a great option but could you index each null field with a default baseline date?

Joe

---

<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:** [January 12, 2024, 3:01pm UTC](https://discuss.elastic.co/t/recency-boost-on-date-field-containing-nulls/349170/3 "2024-01-12T15:01:58Z")

</div>

Closed on January 12, 2024, 3:01pm UTC

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