Skip to main contentSkip to footer
Small changes, but this is a pretty useful one. However, not a mandatory update and since this changes the way Relevanssi does certain things in a fairly radical way, I’d actually suggest NOT to upgrade, unless the new behaviour is something you need and are willing to test.
  • Changed the way search results are paginated. This makes adjusting the number of search results shown much easier.

I’ve posted a knowledge base post that describes how the posts_per_page value is adjusted with Relevanssi 1.4.4.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Custom weighing with relevanssi_match and relevanssi_results

…one week and halve the weight of posts older than that. add_filter( ‘relevanssi_match’, ‘date_weights’ ); function date_weights( $match ) { $post_date = get_the_time( ‘U’, $match->doc ); if ( time() – $post_date < WEEK_IN_SECONDS ) { $match->weight = $match->weight * 2; } else { $match->weight = $match->weight / 2; } return……$title_boost + $match->content + $match->comment * $comment_boost + $match->tag * $tag_boost + $match->link * $link_boost + $match->author + $match->category + $match->excerpt + $match->taxonomy + $match->customfield; $match->weight = $match->tf * $idf; Where $idf is the inverse document frequency, aka the rarity of the term in question. The bigger the weight, the……} return $match; } Weight from tags Relevanssi Premium has a simple weight setting for adding weight to tags. If you want that in free Relevanssi, you have to use relevanssi_match to add extra weight to tags. add_filter( ‘relevanssi_match’, ‘rlv_boost_tags’ ); function rlv_boost_tags( $match ) { if ( $match->tag >…

Related Posts:

Comment Section:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed