Posted on

Premium 2.6 / Free 4.5

The new versions include a couple of new filter hooks that are not of big interest to most users but may be helpful for specific needs.

The biggest change in this version is how the stopwords page works: now it is possible to remove all stopwords without having the stopword list automatically repopulate from the default stopwords. Now there’s an “Add default stopwords” button that does that. If you are upgrading from an older version of Relevanssi and notice your stopwords missing, clicking the “Add default stopwords” should restore your old stopwords.

Known issues

  • Multisite search can include posts from archived sites in the results.
  • Content stopwords aren’t applied to the attachment file content. Fix here.
  • 2.6.1 broke WP 4.9 compatibility.
  • User Access Manager makes drafts appear in search results. Fix here.

Version 2.6.2 is coming soon with fixes for these issues.

Version 2.6.1

  • When using Gutenberg, pinning only works with posts, not with other post types. Version 2.6.1 fixes this so that pinning works in all indexed post types.

New features

Changed behaviour

  • Premium: The relevanssi_related_words filter hook didn’t get the post ID as parameter, which severely constricts its usability. That’s now fixed: the filter gets the post ID as the second parameter.
  • Stopwords are no longer automatically restored if emptied. It’s now possible to empty the stopword list. If you want to restore the stopwords from the file (or from the database, if you’re upgrading from an earlier version of Premium and find your stopwords missing), just click the button on the stopwords settings page that restores the stopwords.
  • Changes to post weights in the relevanssi_results hook did not affect the relevance scores shown in excerpts. That’s changed now, and the displayed scores are now taken from the $doc_weight array, which is returned in the return value array from relevanssi_search().
  • Mostly Premium: Excerpt length and type are now checked outside the loop that goes through the posts. This reduces the number of database calls, but the most important effect is that now multisite searches will always create the excerpts with the settings of the subsite where the search is made and not with the settings of the subsite of each post.

Minor bug fixes

  • Searching for regex special characters (for example parentheses, brackets) caused problems in excerpts.
  • Premium. Phrase matching wasn’t applied to PDF content if the “Custom fields to index” setting was set to “some”.
  • Premium. Indexing taxonomies from the WP CLI could leave old taxonomy terms in the index. This is now prevented.
  • Improvements in handling highlighting for words with apostrophes.
  • Disregard hanging commas at the end of post exclusion settings.
  • Premium. Relevanssi was blocking post queries in WP CLI. That’s now fixed.
  • Sometimes excerpts wouldn’t have an ellipsis in the beginning even though they should.
  • Premium. The ‘Add a redirect’ button did not work if there were no redirects.

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.

5 comments Premium 2.6 / Free 4.5

  1. Hello,

    I am having an issue with the plugin causing a duplicate sql entry.
    I came across another user with the same issue:

    I have tried removing the plugin and reindexing but the error remains.

    The conditions in which I’m getting the error is when I’m pushing the website from live to a staging server. The mysql dump is failing due to the duplicate entry error.

    This is the exact error message:
    ERROR 1062 (23000) at line 673: Duplicate entry ‘41432-???-0’ for key ‘doctermitem’

    Is it viable for us to remove this line:
    UNIQUE KEY `doctermitem` (`doc`,`term`,`item`),

    or to rename it; or if you have an other suggestions in actions we can take to resolve.


    1. Can you set up the push to the staging so that the Relevanssi database table is not pushed? There’s relatively little point in pushing the data over, because you can always rebuild it at the other end.

      Since the database has a unique key, it shouldn’t have duplicate data in the first place, so you may also want to look at the database settings – do the character set settings match? Maybe not, if keys that are working in the other end become corrupted and duplicates on the other end.

      If nothing else helps, just remove the data causing the problem. Either manually remove the offending data, or truncate the Relevanssi database before the push.

  2. Hi,

    we are premiums users and wanted to upgrade, but I think 2.6.1 has (still) problems with WP 4.9:

    ( ! ) Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘relevanssi_register_gutenberg_actions’ not found or invalid function name

    The callback is defined in lib/compatibility/gutenberg.php which is required conditionally in lib/init.php only if the function “do_blocks” is existing.

    Can you fix that in a new minor release?

    Kind Regards

Leave a Reply

Are you a Relevanssi Premium customer looking for support? Please use the Premium support form.

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