Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set date decay logic for Weighting by date using site content #2

Open
brandwaffle opened this issue Feb 9, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@brandwaffle
Copy link

brandwaffle commented Feb 9, 2021

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 brandwaffle added the enhancement New feature or request label Feb 9, 2021
@jeffpaul jeffpaul added this to the Future Release milestone Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants