ElasticPressLabs icon indicating copy to clipboard operation
ElasticPressLabs copied to clipboard

Set date decay logic for Weighting by date using site content

Open brandwaffle opened this issue 5 years ago • 0 comments

Is your enhancement related to a problem? Please describe.

In order to effectively decay older content, we should look to find the oldest content on the site and use this to set reasonable values for the user. These values should be overridable in case someone has one or a few really old posts. Describe the solution you'd like

Designs

We want to accomplish the equivalent of this:

add_filter( 'epwr_boost_mode', 'elasticpress_multiply_boost_mode', 10, 3 );
function elasticpress_multiply_boost_mode( $boost_mode, $formatted_args, $args ) {
    return 'multiply';
}

add_filter( 'epwr_scale', 'elasticpress_decay_scale', 10, 3 );
function elasticpress_decay_scale( $boost_mode, $formatted_args, $args ) {
    return '1800d';
}

add_filter( 'epwr_offset', 'elasticpress_decay_offset', 10, 3 );
function elasticpress_decay_offset( $boost_mode, $formatted_args, $args ) {
    return '30d';
}

Describe alternatives you've considered

Additional context

brandwaffle avatar Feb 09 '21 23:02 brandwaffle