Modify the recency decay parameters for the search query.<p>The recency decay lowers the search scores based on the age of a post relative to an origin date. Basic adjustments:</p> <ul> <li>origin: A date. Posts with this date will have the highest score and no decay applied. Default is today.</li> <li>offset: Number of days/months/years (eg 30d). All posts within this time range of the origin (before and after) will have no decay applied. Default is no offset.</li> <li>scale: The number of days/months/years from the origin+offset at which the decay will equal the decay param. Default 360d</li> <li>decay: The amount of decay applied at offset+scale. Default 0.9.</li> </ul> <p>The curve applied is a Gaussian. More details available at {@see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-decay">https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-decay</a>}</p>
Parameters
- $decay_params
-
(array)
The decay parameters.
- $args
-
(array)
The WP query parameters.
Changelog
Since: Jetpack 5.8.0