Skip to main contentSkip to footer

This version started as a small update to 2.11 and 4.9, but then a customer request made me add a major enough feature to warrant a bigger version number update.

The big new feature in this version is multilingual stopwords and synonyms. If you’re using WPML or Polylang and have your site in multiple languages, you can now have a different set of stopwords and synonyms for each language.

If you have a multilingual site, visit the “Stopwords” tab of Relevanssi settings and see that the stopwords are correct. Relevanssi has stopwords for many languages built-in, so you can often import the stopwords in case they’re missing.

2.12.2 / 4.10.2

  • You can now force Relevanssi to be active by setting the query variable relevanssi to true. Thanks to Jan Willem Oostendorp.
  • Relevanssi has been moved from the_posts filter to posts_pre_query. This change doesn’t do much, but increases performance slightly as WordPress needs to do less useless work, as now the default query is no longer run. Thanks to Jan Willem Oostendorp.
  • Highlighting didn’t work properly when highlighting something immediately following a HTML tag.
  • (Premium) WPML search results that included non-post results caused fatal errors and crashes. This fixes the crashing and makes non-post results work better in both WPML and Polylang.
  • (Premium) Pinning could cause warnings when using fields and non-post results.
  • (Premium) Importing options broke synonym and stopword settings.
  • Improves the Rank Math SEO compatibility to avoid errors in plugin activation.
  • You can no longer set the value of minimum word length to less than 1 or higher than 9 from the settings page.

2.12.1 / 4.10.1

  • The new multilingual synonyms and stopwords did not work perfectly at first. The language used was determined from the global language, which works fine in the Relevanssi settings, but causes the wrong language to be used when all posts are indexed. Now Relevanssi checks the language from the post it is handling, when posts are indexed.
  • (Premium) There was a problem indexing synonyms for AND searches.

New features

  • Relevanssi now supports multilingual synonyms and stopwords. Relevanssi now has a different set of synonyms and stopwords for each language. This feature is compatible with WPML and Polylang.
  • SEO by Rank Math compatibility is added: posts marked as ‘noindex’ with Rank Math are not indexed by Relevanssi.
  • (Premium) New filter hook relevanssi_sidebar_capability adjusts the minimum capability required for seeing the Gutenberg sidebar and the Classic editor metabox. Default value is manage_options, ie. Editor.

Minor fixes

  • (Premium) Attachment weren’t affected by relevanssi_indexing_restriction filters when a new attachment was added. Now the filters apply as they should.
  • With keyword matching set to ‘whole words’ and the ‘expand highlights’ disabled, words that ended with an ‘s’ weren’t highlighted correctly.
  • The ‘Post exclusion’ setting didn’t work correctly. It has been fixed.
  • It’s now impossible to set negative weights in searching settings. They did not work as expected anyway.
  • (Premium) Contributors could see the Relevanssi Gutenberg sidebar, but it didn’t work. Now the sidebar is only shown by default to Editors and above.
  • Relevanssi had an unnecessary index on the doc column in the wp_relevanssi database table. It is now removed to save space. Thanks to Matthew Wang.
  • Improved Oxygen Builder support makes sure ct_builder_shortcodes custom field is always indexed.

The free version is available from the WordPress plugin repository. You can get the Premium version from the Download page or with the automatic update.

The download page shows two different versions of the plugin available. The basic version no longer includes tests or anything else you won’t need when actually using the plugin. The developer version includes tests and all sorts of other tooling you may find interesting if you’re a developer.

Your account

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

Search

Popular Resources

WPML: Replacing posts with translations

Here’s a different approach to WPML searching. By default, you have two options. You can include posts in all languages in the results, or you can only use the current language. This solution checks for matches also in other languages. If Relevanssi finds any, this script then replaces them with……isset( $hit->blog_id ) ) { // This is a multisite search. switch_to_blog( $hit->blog_id ); if ( function_exists( ‘icl_object_id’ ) ) { // Reset the WPML cache when blog is switched, otherwise WPML // will be confused. global $wpml_post_translations; $wpml_post_translations->reload(); } } global $sitepress; // Check if WPML is used. if…

WooCommerce: Return only exact matches for SKU searches

This little filter function works on relevanssi_hits_filter. When a search query is made that matches an SKU (or any other custom field, but SKUs are the most likely scenario here), only results that match the SKU will be returned. For this to work, Relevanssi must be set to index the…

Indexing private custom fields for admins only

…); function rlv_private_custom_fields( $match ) { global $wp_query; $admin_search = $wp_query->is_admin; if ( ! $admin_search && empty( $wp_query->query_vars ) ) { $admin_search = true; } if ( ! $admin_search ) { $customfield_detail = json_decode( $match->customfield_detail ); if ( isset( $customfield_detail->private_custom_field ) ) { $match->weight = 0; } if ( isset(…I use private custom fields. I want to index them in the administration but not on the public site. How to do ? Initially this seems impossible to do with Relevanssi, but it’s possible. Doing this requires Relevanssi Premium. The free version doesn’t know which custom field matches the search term,……$customfield_detail->another_private_field ) ) { $match->weight = 0; } } return $match; } Now when a search is made on the front end and the custom field that has the hit matches one of the private fields, the post weight is set to zero. For  more sophistication, the code should probably…

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