ElasticPressLabs
ElasticPressLabs copied to clipboard
Set date decay logic for Weighting by date using site content
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