The free version of Relevanssi got a long-delayed update, and it turned out to be a major update, probably the biggest ever in the history of Relevanssi. Just look at the changelog… Most of these are, of course, familiar to the Premium users.
- WORD OF WARNING: This is a major update, with lots of changes as you can see, and since I couldn’t find any beta testers to help test it out, consider this a beta release, with bugs probable.
- The database has been updated to match the more advanced structure in Relevanssi Premium. This requires a re-indexing of the database.
- The indexing process is more efficient now.
- Relevanssi now includes a throttle feature, which makes the searches more efficient.
- Relevanssi now disables the default WP search.
- The custom field search hack using cat set to “custom” doesn’t work any more. If you wish to filter by custom field, you need Relevanssi Premium, which does it better anyway.
- Relevanssi can handle certain whitespace characters better in indexing.
- Apostrophes are now replaced with whitespace instead of being removed.
- Relevanssi now shows correct number of results when posts_per_page is set to -1.
- Fuzzy search didn’t always activate when it should, if all found posts are private posts that can’t be shown to user.
- Tab characters in excerpts are handled better now.
- Relevanssi search logs will now store user ID’s and IP addresses for each query.
- You can now use user logins as well as numeric ID’s to stop user from being logged.
- Attachments are now handled better. I’d still like to hear any complaints about attachments.
- Relevanssi now updates index for posts added with wp_update_post() function. (Thanks to Simon Blackbourn)
- Searching for pages in admin didn’t work properly. Fixed that.
- Fixed warnings for undefined variables.
- Relevanssi won’t mess media library searches any more.
- Search terms are no longer highlighted in titles on post pages. That caused too many problems.
- New collation rules to MySQL databases will make sure that word pairs like “pode” and “pôde” will not be considered duplicates in the stopword database.
- You can now set the “Custom fields to index” to “all” to index all custom fields and “visible” to index all visible custom fields (but not the ones with names starting with an underscore).
- Plugin now works properly without multibyte string functions.
- You can now choose to allow HTML tags in excerpts.
- New filter: relevanssi_modify_wp_query lets you modify $wp_query before it is passed to Relevanssi.
- New filter: relevanssi_search_ok lets you adjust when search is enabled.
- New filter: relevanssi_pre_excerpt_content lets you adjust post content before excerpt creation.
- New filter: relevanssi_excerpt_content lets you adjust post content before excerpt creation, but after the_content.
- New filter: relevanssi_ellipsis lets you change the default ‘…’ in excerpts to something else.
- New filter: relevanssi_do_not_index is given a post ID and expects a boolean in return: should this post be indexed or not?
- New filter: relevanssi_match lets you meddle with the matching engine.
- New filter: relevanssi_results filters the result set from the search.
- New filter: relevanssi_content_to_index let’s you add whatever content you wish to posts before they are indexed.
- New filter: relevanssi_didyoumean_query let’s you modify the query for Did you mean? queries
- Changed filter: relevanssi_post_ok has different arguments, see source code for details.
- New shortcode: use shortcode noindex to wrap parts of posts you want to keep from the index.
- And a bunch of other changes.
The biggest change is in the plugin structure, however. From now on, free and Premium share the same underlying code base. I’ve taken the large single plugin file apart and split most of the functionality into smaller units in the lib folder – there’s one file for search, one for indexing, one for excerpts and so on – and these are the same for both versions of the plugin.
Of course free version just didn’t get all the Premium functionality. The files are filled with references to functions that only exist in the Premium version and provide the extra features that people are paying for. There will be more of those, too.
To me this is a major change to an easier direction. When there’s a bug in Relevanssi, it’s quite likely I have to make a single change in one place, and then just copy the fixed lib file to the other version. That’s very simple compared to what I had to do earlier.
The new version is now available in the plugin repository.
I’m currently working on version 1.8.3 of Premium, based on the new code base, but I just want to add some sweet new features to it, so I’m not releasing it quite yet.