apply_filters ( 'jetpack_search_recency_score_decay', array $decay_params, array $args )

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>

Source file: modules/search/class.jetpack-search.php

View in GitHub

Parameters

$decay_params

(array) The decay parameters.

$args

(array) The WP query parameters.


Changelog

Since: Jetpack 5.8.0


Notes

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s