Functional boost on a date field


I'm trying App Search and I was wondering if there is a workaround to boost documents by "freshness" (the closer the date, the better the score).

I see here Relevance Tuning Guide, Weights and Boosts | Elastic App Search Documentation [7.10] | Elastic that:

  • Functional Boost : Applies only to number fields.
  • Proximity Boost : Applies to number and geolocation fields.

Maybe if I store my date as a number I will be able to work this out, but as Elasticsearch provide a nice way of doing what I want:

The decay can be applied on geo_point and date.

Is there any way to boost by Freshness via App Search?


Hi Damien,

What you're looking to do is not possible today in App Search. Functional and proximity boosts in App Search do not apply to date fields, unfortunately. This capability is supported in Elasticsearch itself, but not in App Search.

1 Like

Yeah that's what I saw.

The only way for me to do that then will be to add a "distance" field on my document and boost the one with smallest value. The downside of this solution is that I will need to update my field content every hour/days.

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